Thursday, November 9, 2006

Simulating Return Key

Place this code on page load where buttonID is the ID of the button or image that you want to associate with the Form's return key. On pressing the return key the onclick event for the button is executed.

Page.RegisterHiddenField("__EVENTTARGET", buttonID);

No comments: