tags:

views:

17

answers:

2

hi all i want to know that if in my login.aspx page there is two button login and cancel

now i press enter key of my keybord by default its select cancel button but i want to set it on login how i will do ?

A: 

The <asp:Panel> control has a DefaultButton property, to which you can assign the ID of a default button control.

Consider wrapping your content in a panel and assigning the DefaultButton property of the panel to login.

kbrimington
A: 

You can set the defaultbutton attribute of the form:

<asp:Form runat="server" id="form1" defaultbutton="idofloginbutton">
...
</asp:Form>
jerjer