Validating user input in asp net web pages

Rated 3.95/5 based on 733 customer reviews

The Required Field Validator is actually very simple, and yet very useful.

You can use it to make sure that the user has entered something in a Text Box control.

Or, you could visit your page in other client sides to validate whether it’s associated with your own Browser.

In web forms at the end(when it rendered to the browser) you got only raw html element alone.

Not having any kind of validation is out of the question.

You could use F12 to check whether the Textbox “txt Name” in the code above is been rendered as below.

Then you could try to create a clean page that just has the Text Box controls to make sure it’s not related to other JS functions.

Let's give it a try, and add a Required Field Validator to our page.

We will also add a Text Box to validate, as well as a button to submit the form with.

Leave a Reply