Assembly: System.Web (in system.web.dll)
/** @property */ public String get_DefaultButton () /** @property */ public void set_DefaultButton (String value)
public function get DefaultButton () : String public function set DefaultButton (value : String)
Property ValueA string value corresponding to the ID for a button control contained in the Panel. The default is an empty string, indicating that the Panel does not have a default button.
Use the DefaultButton property to indicate which button gets clicked when the Panel control has focus and the user presses the ENTER key. The DefaultButton can be set to the identifier for a Button control or any control that implements the IButtonControl interface except a LinkButton control.
If the DefaultButton is set to a control that does not implement the IButtonControl interface, or to a control that is not contained in the Panel control, the Panel control throws an exception while rendering.
Setting the DefaultButton property is not supported for the following scenarios:
Setting focus outside of the input controls in the panel and then pressing the ENTER key. The default post back action is not guaranteed to trigger.
Referencing a default button that is a LinkButton control. Only Button and ImageButton controls are supported.
Changing the DefaultButton programmatically during an asynchronous post back when the Panel control is not inside of an UpdatePanel control. Asynchronous post backs can be enabled on a page by adding one or more UpdatePanel controls to the page. UpdatePanel controls can be used to update selected regions of a page instead of updating the whole page with a postback. For more information, see UpdatePanel Control Overview and Partial-Page Rendering Overview.