Pages
Home
React JS
React Native
SQL Server
C#.net
Interview
Videos
Angular
ASP.Net
AJAX
Contact Us
29 January 2015
How to validate double value in c#.net
Add namespace: using System.Text.RegularExpressions;
if (Regex.IsMatch(txt_number.Text, @"\d+(\.\d{1,2})?"))
{
//valid Number
// Do something with value
}
else
{
//invalid Number
lbl_error.Text = "Please enter a valid number";
return;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment