Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB.NET
how to give validation in to numeric and string field
Posted 16-Feb-13 0:03am
bandi.ramesh at 16-Feb-13 5:05am
where do you need it, server-side or client-side?
Maciej Los at 16-Feb-13 5:06am
Please, be more specific and provide more details.
Sandeep Mewara at 16-Feb-13 7:07am
Sounds straight forward. What have you tried so far?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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"
    intNumber = CInt(strTestString)
    Throw New System.Exception("Not Numeric")
End Try

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 295
1 DamithSL 295
2 Sergey Alexandrovich Kryukov 197
3 Peter Leow 155
4 Afzaal Ahmad Zeeshan 154
0 OriginalGriff 7,510
1 DamithSL 5,494
2 Sergey Alexandrovich Kryukov 4,954
3 Maciej Los 4,936
4 Kornfeld Eliyahu Peter 4,514

Advertise | Privacy | Mobile
Web01 | 2.8.141223.1 | Last Updated 17 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100