.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

RegularExpressionValidator with decimal

Posted By: Ramesh     Posted Date: March 11, 2010    Points:2   Category :ASP.Net
Hi,

I need Regular expression to be used in RegularExpressionValidator for validating numeric value accepting decimals in any place.

I am using asp.net and c#

Regards
Ramesh

Responses
Author: Lalij Mer             
Posted Date: March 11, 2010     Points: 5   



User Control RegularExpressionValidator with number and decimal regex Try this regex -
\d{1,}\.?\d{0,}


<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtWeight"

ErrorMessage="Format(X.XX)" ValidationExpression="\d{1,}\.?\d{0,}"></asp:RegularExpressionValidator>


Please Check my answer if you help....
Thank You...

Lalit.
Author: Syed Shakeer Hussain             
Posted Date: March 14, 2010     Points: 5   

Hi
Try the following RegularExpression
\d{1,}.\d{1,}

Author: TotalDotNet             
Posted Date: August 16, 2010     Points: 5   


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend