RequiredFieldValidator control example

RequiredFieldValidator control example

Previous Home Next

 

The RequiredFieldValidator is actually very simple, and yet very useful. You can use it to make sure that the user has entered something in a TextBox control. Let's give it a try, and add a RequiredFieldValidator to our page. We will also add a TextBox to validate, as well as a button to submit the form with. 

  
     

   

 .........................Designing code forRequiredFieldValidator..
...................................................................

....................................................................
...................................................................
..........................design code for textbox..................
...................................................................


.....................................................................................design code for button.............................
....................................................................

....................................................................
Previous Home Next