Validating date in textbox in asp net
Here I will choose the Date Time data type and then set the visibility of the parameter to visibie, in other words you want to show the parameter in the SSRS report.In the same manner we create another parameter for Order To Date. Now when we run the SSRS report we can see two parameters on the top of SSRS report window. In my case the validation of the Order from Date is that it should be less than the Order to date. Step 1Create a Parameter name as Is Validdate and set the visibility to internal because we use this parameter for internal processes only. Then go to the default values tab of this parameter and specify values.In the following window you can see how I call the Custom code function.The Is Valid Date parameter returns a value on the behalf of the function Check Date.Note: If you use a parametrized Stored Procedure then there is no need to create a parameter in SSRS Reports.To create a parameter we need to go the Report Data window and then go to the Parameter folder and right-click on that and select Add Parameter.
We want to avoid the round trip if we can and bring in some client side validation.
Now we need to test the preceding approach in a SSRS Report. Here I have used an order from date of October and an order to date of April and clicked the View Report button and then I got the following message that is the purpose of this tutorial.
Once you’ve added the above code, build and run your project (F5) and you should have a failing validation on date of birth textbox which will fire when you hit the Create button.
Note: if you use a parametrized Stored Procedure then there is no need to add filters here.
Here I will create two filters for the Order From date and Order to date parameters.