Click here to Skip to main content
15,916,600 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
i create one form, in that when user enter the data in textbox,if textbox is assign to numeric values then if user enter the text value how generate error?

the same question is for asp.net but it show the error message atwhen user enter wrong values.
Posted
Comments
Sanjay J Patolia 21-May-11 2:37am    
Would you like to throw a custom error from it? or you would like to display a message ?

1 solution

I think you can display a label with error description in it on entering wrong values in text box.

Secondly, you can just make handle false on entering wrong character in it. so that it will not allow there to write any character in it.

For ASP.NET you may use in built validators or you can use java script for handle it manually with error labels next to your textbox.
 
Share this answer
 

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