System.Web.UI.WebControls.Button Members

The members of System.Web.UI.WebControls.Button are listed below.

See Also: Inherited members from System.Web.UI.WebControls.WebControl

Public Constructors

Initializes a new instance of the System.Web.UI.WebControls.Button class.

Public Properties

CausesValidationbool.

Gets or sets a value indicating whether validation is performed when the System.Web.UI.WebControls.Button control is clicked.

CommandArgumentstring.

Gets or sets an optional parameter passed to the Button.Command event along with the associated Button.CommandName.

CommandNamestring.

Gets or sets the command name associated with the System.Web.UI.WebControls.Button control that is passed to the Button.Command event.

OnClientClickstring.

Gets or sets the client-side script that executes when a System.Web.UI.WebControls.Button control's Button.Click event is raised.

PostBackUrlstring.

Gets or sets the URL of the page to post to from the current page when the System.Web.UI.WebControls.Button control is clicked.

Textstring.

Gets or sets the text caption displayed in the System.Web.UI.WebControls.Button control.

UseSubmitBehaviorbool.

Gets or sets a value indicating whether the System.Web.UI.WebControls.Button control uses the client browser's submit mechanism or the ASP.NET postback mechanism.

ValidationGroupstring.

Gets or sets the group of controls for which the System.Web.UI.WebControls.Button control causes validation when it posts back to the server.

Protected Methods

override
AddAttributesToRender(System.Web.UI.HtmlTextWriter)

Adds the attributes of the System.Web.UI.WebControls.Button control to the output stream for rendering on the client.

GetPostBackOptions() : System.Web.UI.PostBackOptions

Creates a System.Web.UI.PostBackOptions object that represents the System.Web.UI.WebControls.Button control's postback behavior.

OnClick(EventArgs)

Raises the Button.Click event of the System.Web.UI.WebControls.Button control.

OnCommand(CommandEventArgs)

Raises the Button.Command event of the System.Web.UI.WebControls.Button control.

override
OnPreRender(EventArgs)

Determines whether the button has been clicked prior to rendering on the client.

RaisePostBackEvent(string)

Raises events for the System.Web.UI.WebControls.Button control when it posts back to the server.

override
RenderContents(System.Web.UI.HtmlTextWriter)

Renders the contents of the control to the specified writer.

Public Events

Click

Occurs when the System.Web.UI.WebControls.Button control is clicked.

Command

Occurs when the System.Web.UI.WebControls.Button control is clicked.

Explicitly Implemented Interface Members

System.Web.UI.IPostBackEventHandler.RaisePostBackEvent

Raises events for the System.Web.UI.WebControls.Button control when it posts back to the server.