Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain what is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

1053


Explain the different parts of an assembly?

1046


Explain the garbage collection process?

1088


Explain how to stop a thread?

1056


How will you load an assembly which is not referenced by current assembly?

1026


Explain me why do we use msmq?

1045


What does .net stand for?

1022


What is 'Common Type System' (CTS) in .NET?

1130


How many design patterns can be created in .net?

1021


What is assemblies in .net?

1122


Explain different types of html, web and server controls.

1009


Can you edit data in repeater control? How?

989


What is the use of design pattern?

1024


What are the advantages of .net?

1010


Difference between machine.config and web.config?

1049