Gridview textbox format validation

How can a textbox in a gridview be best enforced with taking in a numeric string of 7 chars no more and no less? validator control or javascript?
Who is Participating?
divinewind80Connect With a Mentor Commented:
Unless you are using AJAX, I would suggest using Javascript.  I prefer the validation to be real-time, rather than on postback.  That is my preference though.  

You should be able to do this by setting the textbox "onkeyup" property to your Javascript function.  Let me know if you have any questions about doing so.

Hope this helps.
ksfokAuthor Commented:
I have ajax installed. The gridview is currently a regular gridview. Please advsise details on how to implement javascript and AJAX way. Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.