for the textbox if i want to allow only numbers.what ever
the characters u enter it should not take.which event u used?
Answer Posted / chandra sekhar
@kinjal what is the use of using compare validator here??
and with what yopu are comparing the value?? your answer is
absolutely wrong.
If we want to allow only integers into a textbox then use
"^\d{0,9}" expression.
ex: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator1" runat="server"
ControlToValidate="TextBox1"
ErrorMessage="RegularExpressionValidator"
ValidationExpression="^\d{0,9}"></asp:RegularExpressionValidator>
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
How to instantiate a delegate?
What are pdbs?
What is .net3.0 and .net3.5?
Is there built-in support for logging?
What is STA in .NET?
What is your observations between vb.net and vc#.net?
Why did they call it .net?
What is the difference between .net 2000 and .net 2005(features)? Which one is better?
What is Code group in .Net with respect to CAS
Explain how to rename a table using sql queries?
How to customize the trace output?
What versions of .net are there?
Please explain what is the .net framework and how does it work?
What is immutability?
What are the core differences between .NET Languages ?