Let me explain this using an example.
One makes a login page. Places "Login" and "Cancel" buttons below "User name" and "Password" Text boxes. He expects that whenever he will be pressing the Enter key while typing in User name or the password text box the "Login" button will be clicked, but sometimes this doesn't happen. Either Cancel gets clicked or any other button from page get clicked. Frustrated? Ok here is the solution for this
For this use an
For Example
<asp:panel runat="server" id="pnlMain" defaultbutton="btnSave">
<!-- All of your controls here -->
</asp:panel>
Now whenever one will press enter in any text box written in between the panel then btnSave will be clicked by default.
No comments:
Post a Comment