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
What is "microsoft intermediate language" (msil)?
Is .net capable of supporting multi-thread?
Explain about .net assemblies?
Describe the programming model of a windows service
Explain the different types of proxy patterns?
How do we access crystal reports in .net?
which method do you use to redirect the user to another page without performing a round trip to the client? How?
How inheritance works in .net?
Explain what relationship is between a process, application domain, and application?
Tell us what is the native image generator?
what is machine key error in .NET how can we solve it?
Can a try block have more than one catch block?
What is singlecall activation mode used for in .net?
What is your observations between vb.net and vc#.net?
What is a variable of implicit type and what is its scope?