Wednesday, October 13, 2004

How to make a button default when enter key is hit (ASP.NET)

Enter Botton
--------------------------
--------------------------
Use this code :
Page.RegisterHiddenField("__EVENTTARGET", "btn_buttonID");
Write this line in your code behind, this line of code should be written in Page_Load event,
this line would always make btn_buttonID fire a click event when ever enter is pressed
--------------------------
--------------------------


No comments: