Mathew Paul
Mathew Paul

Reputation: 663

Image button as default button

In my application i have an image button and two text boxes in a form. i want to make this image button as default button is there any provision to do like that..

Upvotes: 2

Views: 3740

Answers (2)

Sukhjeevan
Sukhjeevan

Reputation: 3156

Try this one in form tag:

<form id="form1" runat="server" defaultfocus="imagebutton1">

Upvotes: 1

Harsh Baid
Harsh Baid

Reputation: 7249

you can do that using Panel

<asp:Panel id="pnl" runat="server" DefaultButton="imagebutton1">

// Some controls and code //

<asp:ImageButton id="imagebutton1" runat="server" ImageUrl="images/imge.gif" >
</asp:ImageButton>

// Some controls and code //

</asp:Panel>

Upvotes: 4

Related Questions