Click here to Skip to main content
12,076,727 members (46,500 online)
Rate this:
 
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 3:25am
Comments
Sandeep Mewara 25-Dec-12 11:22am
   
And what have you tried so far?
pinky1810 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160212.1 | Last Updated 25 Dec 2012
Copyright © CodeProject, 1999-2016
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