Skip to main content

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.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

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