Vinit Patel

Key Down Event For Textbox

Posted on: June 2, 2009


Basically we have the last Textbox for any web page.

Then we dont want to move the cursor position to the button,

this will work only with Internet Explorer…

Last we have the cursor control in the password textbox.

From there only if we want to Login to the next page .

For Ex, Like Below

We have to write below code,

In the page load event,

txtPassword.Attributes.Add(“onkeydown”, “if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById(‘” + btnSubmit.UniqueID + “‘).click();return false;}} else {return true}; “);

Vinit Patel.

Advertisements

2 Responses to "Key Down Event For Textbox"

nice its solve my prob.

Thnks Man…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Calendar

June 2009
M T W T F S S
    Jul »
1234567
891011121314
15161718192021
22232425262728
2930  

Stats Of Blog

  • 6,792 hits

Cluster Map

%d bloggers like this: