I am having trouble finding a method of data verification that checks to see if what the user has entered is a string of only numbers or if it contains letters as well. Can anyone point me in the right direction?
You can try the compare Validator. Set the type to compare to be int or double.
This will allow you to check the value client side. In your code behind you also have access to the IsNumeric() method. That'l do donkey, that'l do
Mark
If you are unsure of forum etiquette check here faq796-2540
No problem Dust The Framework is a rather large yes.
Zombie I want to comment on your suggestion.
It's a completely bad idea (no offense). Doing what you suggest means that everytime the user changes the data in that text box a round trip to the server is going to be made. While this may not be a big problem in an intranet environment it has huge complications once you put the application out on the Internet. Especially if you have a user that is connected through dial up. The round trip to the server simply takes too long. It also interupts the users flow as the have to wait/pause even for a second while the page makes that round trip.
It's not to bad if you put server side validation code on a button click since the trip to the server is being made anyway. But if you check the data on all your input boxes server side as the changes happen people will get very frustrated with your application. And the main goal of any application is really to satisfy the end user.
Enough of my ranting, I just wanted to stress the consequences of validating as you suggested. That'l do donkey, that'l do
Mark
If you are unsure of forum etiquette check here faq796-2540
No offense taken. The solution I offered was in fact not the best one for applications using slow Internet connections, I agree. But on an Intranet, or fast Internet connection, it provides for much more functionality than the Validator control does. Since the initial question did not specify more than one text box or whether the application was for Intranet or Internet, I went with my first thoughts.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.