Click here to Skip to main content
Rate this: bad
good
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)
please...
Posted 25-Dec-12 2:25am
Comments
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
good
Please Sign up or sign in to vote.

Solution 1

Hi , try to use regex value (\d{3}\.\d{2}\)
  Permalink  
Comments
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 OriginalGriff 210
1 Richard MacCutchan 100
2 kbrandwijk 100
3 ProgramFOX 80
4 Mukesh Bhagat 65
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 25 Dec 2012
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