Click here to Skip to main content
15,896,456 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to give validation in vb.net to numeric and string field
Posted
Comments
Bandi Ramesh 16-Feb-13 5:05am    
where do you need it, server-side or client-side?
Maciej Los 16-Feb-13 5:06am    
Please, be more specific and provide more details.
Sandeep Mewara 16-Feb-13 7:07am    
Sounds straight forward. What have you tried so far?

1 solution

Here is an example of one way to test that a string is all numeric:
Dim intNumber as integer=0
Dim strTestString as string = "123456"
Try
    intNumber = CInt(strTestString)
Catch
    Throw New System.Exception("Not Numeric")
End Try
 
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