Click here to Skip to main content
15,905,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What is the validation used for not remaining the fields blank?Suppose during filling the fields just left one field.so there must be a error message shown to me that "field must be filled up...".

Thank you..!
Posted
Comments
Shivani Dash 20-Jul-12 2:16am    
i am asking to control 3/4 fields...Among 3/4 fields if i left 2/1 then the message would show.
Shivani Dash 20-Jul-12 2:21am    
Thank You..!!

It's called RequiredFieldValidator[^].
 
Share this answer
 
Validation is indeed used for that. I don't know, are you talking about the web ? Your question is vague and poorly defined. The short answer is, it works the way it was designed but it's easy to write code to change it or write your own validation.
 
Share this answer
 
Hey you can use RequiredFieldValidator control for that

Have a look on below links

http://www.w3schools.com/aspnet/aspnet_refvalidationcontrols.asp[^]
Validator Controls in ASP.NET[^]
 
Share this answer
 
ASP.Net provides a number of ways to do validation for fields.
You can have choices from simple text comparison to regular expressions.

There are a number of server validation controls provided - read about them at http://www.w3schools.com/aspnet/aspnet_refvalidationcontrols.asp[^].
You can read about them at these links as well (plus tons of other links on the internet)
http://msdn.microsoft.com/en-us/library/aa479013.aspx[^]
http://msdn.microsoft.com/en-us/library/ms972961.aspx[^]

In addition, you can always attempt validation on the client side itself (using the scripting language).
This is shown in a simple sample at http://www.w3schools.com/js/js_form_validation.asp[^].
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900