How to call a code-behind event/method when user hits enter on a text box and avoid double postback

You can use the onkeypress client-side event, then call __doPostCallBack passing the control’s name as argument for eventTarget and return false. It’s important for the method to return false to avoid post backing twice on Internet Explorer. The Script.js file: You can also pass values to the eventArgument of __doPostBack via client-side and receive with […]