Now we have to discuss about the validationexpression ie:
the textbox should accept empty values , numeric ( float )
.Implementation Code :
^\d*\.?\d*$
HTML
runat="server" ErrorMessage="Invalid format" ControlToValidate="TextBox3" ValidationExpression="^\d*\.?\d*$" ValidationGroup="d"></asp:RegularExpressionValidator> ValidationGroup="d" /> |
Matches
( ) -> empty value4535
520.20
2.54
Non-Matches
21.0dfdf
47854
Rpks
If you have better solution, just tell me !
0 comments:
Post a Comment