Skip to main content
A newer version of this page is available. .

ButtonSettings.UseSubmitBehavior Property

Gets or sets a value indicating whether the button uses the client browser’s submit mechanism or the ASP.NET postback mechanism.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll

Declaration

public bool UseSubmitBehavior { get; set; }

Property Value

Type Description
Boolean

true, if the button uses the client browser’s submit mechanism; otherwise, false. The default is false.

Remarks

If the value of this property is true, the button uses 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.

The following example illustrates how to use the UseSubmitBehavior property.

Html.DevExpress().Button(btnSettings =>
{
    btnSettings.Name = "btnLogon";
    btnSettings.Text = "登录";
    btnSettings.Width = 100;
    btnSettings.Height = 25;
    btnSettings.UseSubmitBehavior = false;
    btnSettings.RouteValues = new { Controller = "Home", Action = "Main" };
}).Render();
See Also