Validating dates with comparevalidator in 2 0
In my application, i have a textbox namely textbox1.
Make sure the culture is set correctly in your web.config and set Culture Invariant Values to false.
After submitting the form, the server returns an error indicating null field provided there is no proper error handling techniques employed on the server side script.
The validation should not be done by using ASP controls. Although they run at the server, they can emit client side script that fires at the *client*. The reason for that is that the extender still allows manual insertion of text into the box.
So, simply use a Compare Validator control, set the current date as the value on the server (which is then transmitted to the client) and let the validation framework handle the rest. I don't see the problem, and I don't see why this wouldn't be precise. I don't see the point of writing separate client-side validation, if I am using the ASP.
These difficulties can be avoided if the form had been properly validated.
During development, proper rules must be set to let the user know what to do if a specified error occurs. They are Each of these above controls can be linked to . NET Web Matrix for coding and testing the listings shown on this article (See figure 1).