Server side form validating numbers asp

By supporting client-side validation, users are spared a round-trip when validating data input to the page.In addition to client-side validation, most sites also support server-side validation for two reasons: to make sure no data was garbled or modified during transmission, and to support clients unable to support client-side scripting (perhaps the client browser doesn't support Java Script). If you looked at the ASPX source code generated by Visual Studio as you placed controls on the page, you probably noticed the page became littered with even more tags, such as server-side control tags to support text boxes and selection controls.Once you've ensured users fill the required fields, it's important to make sure that the data coming from users is likely to be correct.For example, you may not be able to ensure the veracity of the user's phone number, but at least you can make sure it is in the right format and doesn't contain garbage.

Each validation control implements an interface named IValidator.In addition, each validator control placed on the page corresponds to a separate tag. They render standard browser-interpretable code-similar to the regular server-side controls. NET validator controls support client-side validation by linking a Java Script file named Web into the HTML sent to the browser.The file contains the client-side validation functions necessary to support client-side validation.Once the client has passed the client-side validation tests, the request is posted back to the server and the server-side validation kicks in.Server-side validation is managed by infrastructure within the Page class.

Leave a Reply