Export (0) Print
Expand All

Panel.DefaultButton Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the identifier for the default button that is contained in the Panel control.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

[ThemeableAttribute(false)] 
public virtual string DefaultButton { get; set; }
/** @property */
public String get_DefaultButton ()

/** @property */
public void set_DefaultButton (String value)

public function get DefaultButton () : String

public function set DefaultButton (value : String)

Property Value

A 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.

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.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins Overview.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft