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 the difference between odbc and ado?
Explain the difference between task and thread in .net?
What are Satellite Assemblies? How you will create this? How will you get the different language strings?
Explain what is immutability, what is it for and how is it codified?
How will you do redo and undo in textbox control?
What are data types in .NET?
Explain the difference between garbage collections in .net 4.0 and earlier versions?
How many types of transactions are there in com + .net ?
explain the states of a window service application?
Is .net a programming language?
What is a windows process in .net?
How can I get at the win32 api from a .net program?
What are the new features of Framework 1.1 ?
What do you mean by Code Access Security in .NET?
What is delegation in .net?