我有一個默認的按鈕設置的asp.net面板,但按鈕從不觸發時按下ENTER按鈕。我搜索了這個問題,但找不到任何有效的答案。默認按鈕不工作在asp.net面板
如何獲得btnRegister當用戶點擊ENTER時單擊?
<asp:Panel runat="server" ID="pnlCustomer" DefaultButton="btnRegister">
<table width="500px" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
<asp:Button ID="btnBackToProfile" Text="Back To Profile" runat="server" Enabled="false"
onclick="btnBackToProfile_Click" />
</td>
<td align="right">
<asp:Button ID="btnClearnForm" Text="Clear Form" runat="server"
OnClientClick="ClearForm1()" />
</td>
<td align="right">
<asp:Button id="btnRegister" runat="server" onclientclick="document.getElementById('AlertTime').value = GetSeconds();" Text="Continue" OnClick="btnRegister_Click" />
</td>
</tr>
</table>
</asp:Panel>
看到這個答案 http://stackoverflow.com/questions/2155048/onclientclick-and-onclick-is-not-working-at-the-same-time – 2012-08-12 15:53:45