Thursday, January 27, 2011

How to make enter key to cause postback in asp.net webform textbox by JQuery

How to make enter key to cause postback in asp.net webform textbox by JQuery

Need call doPostBack in asp.net webforms.
$('#<%=TextBox.ClientID %>').keypress(function (event) {
if (event.which == '13') {
__doPostBack('<%= TextBox.ClientID%>', '');
}
});

No comments:

Post a Comment