ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net General
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
for the textbox if i want to allow only numbers.what ever
the characters u enter it should not take.which event u used?
 Question Submitted By :: Om Namo Bagavathe Vasudevaya N
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
Three events are triggered when a key is pressed and 
released: 
keydown 
keypress 
keyup 
The keydown event occurs when the key is pressed, followed 
immediately by the keypress event. Then the keyup event is 
generated when the key is released. 
In order to understand the difference between keydown and 
keypress, it is useful to understand the difference between 
a "character" and a "key". A "key" is a physical button on 
the computer's keyboard while a "character" is a symbol 
typed by pressing a button.  In theory, the keydown and 
keyup events represent keys being pressed or released, 
while the keypress event represents a character being typed.
 
Is This Answer Correct ?    5 Yes 6 No
Anjaan
 
  Re: 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
# 2
if u r using web application then take one textbox and use comparevalidator

set properties of comparevalidator .

<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TextBox1"

Display="Dynamic" ErrorMessage="Integer required."
Operator="DataTypeCheck" SetFocusOnError="True"

Type="Integer"></asp:CompareValidator>
 
Is This Answer Correct ?    4 Yes 3 No
Kinjal
 
 
 
  Re: 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
# 3
@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 ?    1 Yes 0 No
Chandra Sekhar
 

 
 
 
Other Dot Net General Interview Questions
 
  Question Asked @ Answers
 
What?s a Windows process?  1
What security mechanisms to enforce for Authenticating and authorizing the users?  1
what is managed data and managed code?  2
What is the difference between VB and VB.NET?  1
What are the new features of Framework 1.1 ?  1
What is the difference between custom control and web control?  2
How do you give a Windows service specific permissions?  1
what is the use of "mustinherit" keyword?  2
What is meant fulltrust?  1
Where does the dispose method lie and how can it be used to clean up resources? Wipro1
Difference between VB.NET and C#. Which is faster ? TCS11
How many types of exception handlers are there in .NET?  1
what are design patterns in .net....?  2
What is Application Domain?  1
What is different between Web User Control and Web Custom Control?  1
syntax for binding the data from database Satyam1
what is the default value of CHAR type?in C# using asp.net? Bosch3
how to connect database connectivity in dotNET? if suppose SQL server?and also MS access?  5
Difference between assembly manifest & metadata  2
How do you create threading in .NET? What is the namespace for that?  1
 
For more Dot Net General Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com