Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET
Can anyone give me the validation expression for validating text box for numeric value of type decimal(3,2)
Posted 25-Dec-12 3:25am
Sandeep Mewara at 25-Dec-12 11:22am
And what have you tried so far?
pinky1810 at 26-Dec-12 2:19am
I did't try any validation expression because i dont know much about this, Instead I tried to convert the textbox value to decimal by using parse and convert statement but did't work. In the DB the field type is decimal(3,2). can you give me the validation expression for this please

1 solution

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

Solution 1

Hi , try to use regex value (\d{3}\.\d{2}\)
pinky1810 at 26-Dec-12 0:56am
Hi. Thanks for reply, I have text box inside the gridview , I used (\d{3}\.\d{2}\) as a regular expression , but it is showing error while binding the grid.
error:(\d{3}\.\d{2}\) is not a valid regular expression.
i want textbox to accept only numbers like, 2.22,1.22,9.66 etc

please help

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

  Print Answers RSS
0 Maciej Los 470
1 Sergey Alexandrovich Kryukov 424
2 OriginalGriff 360
3 Abhinav S 250
4 CHill60 240
0 Sergey Alexandrovich Kryukov 10,102
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 25 Dec 2012
Copyright © CodeProject, 1999-2015
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