469,364 Members | 2,398 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,364 developers. It's quick & easy.

Numeric Validation in c#.net

ramprabu
Hello,

I was get some data from a database. I wants to check the data is number or string. How can I solve this problem in c#.net?

Regards

Ram Prabu
Feb 8 '07 #1
2 4517
shweta123
692 Expert 512MB
Hi,

Use isNumeric to determine wheather its a number.If it returns False data is string as string can contain anything including numbers.

Shweta
Feb 8 '07 #2
nmsreddi
366 256MB
Hello

you can use a logic here just find the Ascii values characters and use a if

else condition ,thats all you can easily differentiate the numerics and

characters ,i was using the same logic but for some different purpose ,i

validated while inserting into the database.

Hope may help you..
Feb 9 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

30 posts views Thread by Dr John Stockton | last post: by
16 posts views Thread by Keith | last post: by
16 posts views Thread by tshad | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.