My masterpage has a search textbox and button.
My login page has a username, password and remember me checkbox.
When the user is on the login page, I would like the user to be able to hit the enter key and submit the form.
I haved added this code which works fine if you do not check the checkbox after typing in the password
txtPassword.Attributes.Add
("onkeydow
n", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('
"+btnLogin
.UniqueID+
"').click(
);return false;}} else {return true}; ");
Is it possible to have the login page submit the form regardless if the checkbox is checked?
Then on all of the other pages, when the user hits the enter key, it searches the web site. (masterpages textbox)
Start Free Trial