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
Compare client server application with n-tier application
Please explain when should you use .net web forms over asp.net mvc?
Explain the difference between managed and unmanaged code?
With these events, why wouldn't microsoft combine invalidate and paint, so that you wouldn't have to tell it to repaint, and then to force it to repaint?
How is threading done in .net?
Is .net an object oriented language? What are their components?
What is static constructor, when it will be fired? And what is its use?
What is a metadata in .net?
Explain what is the difference between encrypting a password and applying a hashing?
Compare & contrast rich client (smart clients or windows-based) & browser-based web application
If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
What is loosely coupled solution in.net?
What are the different types of remote object creation mode in .net?
I have a problem in installing visual Studio 2008 on PC that have Celeron Processor ? afterAll InstallionFaied . Pls suggest me . Is it possible or not .if Yes then How ?
Explain Different kinds of methods?