[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Gridview textbox format validation

Posted on 2007-10-15
Medium Priority
Last Modified: 2008-01-09
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?
Question by:ksfok

Accepted Solution

divinewind80 earned 1500 total points
ID: 20080833
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.

Author Comment

ID: 20081058
I have ajax installed. The gridview is currently a regular gridview. Please advsise details on how to implement javascript and AJAX way. Thanks.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question