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 what is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?
Explain the different parts of an assembly?
Explain the garbage collection process?
Explain how to stop a thread?
How will you load an assembly which is not referenced by current assembly?
Explain me why do we use msmq?
What does .net stand for?
What is 'Common Type System' (CTS) in .NET?
How many design patterns can be created in .net?
What is assemblies in .net?
Explain different types of html, web and server controls.
Can you edit data in repeater control? How?
What is the use of design pattern?
What are the advantages of .net?
Difference between machine.config and web.config?