In this tutorial we'll build a simple form with client-side Java Script validation.This tutorial will show you how to create a Java Script-enabled form that checks whether a user has filled in the form correctly before it's sent to the server.If a user fails to put text in any of the text boxes, a red asterisk (the Required Field Validator) will appear next to the appropriate text box and the button won’t continue to the event handler until all text boxes have text.Text End Sub End Class Save and run the application, it my ask to ‘Modify the Web.config file to enable debugging’, click OK.
When all fields have text and the button is clicked then the label we assigned the text values to will appear next to the button.
In the solution explorer panel, right click the project solution and click Add New Item.
Make sure Visual Basic is the installed template and select Web Form.
For all Required Fieldvalidators, change the Error Message to ‘*‘ (an asterisk) and change the Fore Color to Red.
In the toolbox panel, drag a Label item after the closing button tag and delete it’s text.