System.Web.UI.WebControls.Button.UseSubmitBehavior Property

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.

Syntax

[System.Web.UI.Themeable(false)]
[System.ComponentModel.DefaultValue(true)]
public virtual bool UseSubmitBehavior { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the Button.UseSubmitBehavior property to specify whether a System.Web.UI.WebControls.Button control uses the client browser's submit mechanism or the ASP.NET postback mechanism. By default the value of this property is true, causing the System.Web.UI.WebControls.Button control to use the browser's submit mechanism. If you specify false, the ASP.NET page framework adds client-side script to the page to post the form to the server.

When the Button.UseSubmitBehavior property is false, control developers can use the erload:System.Web.UI.ClientScriptManager.GetPostBackEventReference method to return the client postback event for the System.Web.UI.WebControls.Button. The string returned by the erload:System.Web.UI.ClientScriptManager.GetPostBackEventReference method contains the text of the client-side function call and can be inserted into a client-side event handler.

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

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0