Monday, March 25, 2013

How to set dynamic DEfault button in dot net whith master page and usercontrol in datalist


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