How do set a button default for enter key?
I want that when I press enter a particular button will be triggered.
在窗体中使用AcceptButton
属性以使用选定的按钮接受
The form object has an AcceptButton property. Just set it to your desired button
您可以将defaultbutton属性放在表单标签中
<form runat="server" defaultbutton="Button1">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.