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
Explain different types of html, web and server controls.
What are the new features of Framework 1.1 ?
In code behind class, name the type of code found. Is it the server side code or client side code?
What is .net3.5?
Can you write a class without specifying namespace?
What is namespaces in .net?
what is the keyword used for self reference?
Explain the process of serialization in .NET?
What is the concept of inheritance and how it works in .net?
Explain the use of activex control in .net?
What are the different.net tools which you used in projects?
I'm having some trouble with cas. How can I troubleshoot the problem?
How to load a user control dynamically in runtime?
How is .net core cross platform?
Describe the use of following com+ services jit activation, queued components, object pooling.?