开发者

handling with sever side control button

hi all i want to know that if in my login.aspx page ther开发者_Go百科e 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 ?


You can set the defaultbutton attribute of the form:

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜