Pages

Friday, October 26, 2012

How to make ASP.NET Image button as default button




I have 2 textbox and 2 image button and I wanted to trigger first image button when any user press 'enter' key. so for making any image button as default button, we need to add 'defaultfocus' attribute into HTML FORM tag with image button name.

e.g.
<form id="form1" runat="server" defaultfocus="imagebutton1">

No comments:

Post a Comment