Latest web development tutorials

ASP.NET Panel DefaultButton property

Control Panel Control Panel

Definition and Usage

ID DefaultButton property sets or returns the Panel control the default button.

Use DefaultButton property indicates when the Panel control has the focus and the user presses the Enter key, which button is clicked.

grammar

<asp:Panel DefaultButton="button_id" runat="server">
Some Content
</asp:Panel>
属性 描述
button_id 要作为默认按钮使用的按钮的 ID。


Examples

The following examples are provided to DefaultButton Control Panel:

<form runat="server">
<asp:Panel runat="server" DefaultButton="bt1">

<asp:TextBox runat="server" />
<asp:Button id="bt1" Text="Default" runat="server" />

</asp:Panel>
</form>

The demonstration >>

Control Panel Control Panel