Answer: defaultbutton property is used for setting focus on Button.
defaultbutton works as an Enter key.
When user press enter key from keyboard,then Button event automatically fired.
For Example:-
<form id="form1" runat="server" defaultbutton="btnSubmit">
<div>
<asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit"/>
</div>
</form>
Asked In: Many Interviews |
Alert Moderator