//Assign enter button in code behindtxtAmtFrom.Attributes.Add("onkeydown", "clickHandler(document.all." + btnSearch.ClientID + ")");
txtAmtTo.Attributes.Add("onkeydown", "clickHandler(document.all." + btnSearch.ClientID + ")");
// ...
// here the "btnSearch" is the button control id whose click event will be fired
// the handler function clickHandler(btn)
{
if (event.keyCode == 13)
{
event.returnValue=false;
event.cancel = true;
btn.click();
}
}
No comments:
Post a Comment