string st="BtnSubmit" ;//button control id, txtBox= Textbox id this is for gridviw or repeater or datalist
((TextBox)e.Item.FindControl("txtBox")).Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('" + st + "').click();return false;}} else {return true}; ");
No comments:
Post a Comment