Back to Devexpress

ASPxButton.EnableClientSideAPI Property

aspnet-devexpress-dot-web-dot-aspxbutton.md

latest3.6 KB
Original Source

ASPxButton.EnableClientSideAPI Property

Gets or sets a value that specifies whether the button can be manipulated on the client side via code.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public bool EnableClientSideAPI { get; set; }
vb
<DefaultValue(False)>
Public Property EnableClientSideAPI As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the button’s client object model is fully available; false if no programmatic interface is available for the button on the client side.

|

Remarks

The EnableClientSideAPI property controls the availability of the client-side API for the control.

The ASPxButton control implements a comprehensive JavaScript-written client-side object model (client API), allowing you to programmatically manipulate the control on the client.

If you want to use the control’s client-side API in your application, set the EnableClientSideAPI property to true, to make sure that the client API is available on the client side.

Note

Regardless of the EnableClientSideAPI property setting, the client-side API is automatically enabled if the ASPxButton.ClientInstanceName property is defined, or any client event exposed by the ASPxButton.ClientSideEvents property is handled.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EnableClientSideAPI property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-win-add-custom-button-to-form-using-custom-view-item/CS/MySolution.Module.Web/ButtonDetailViewItemWeb.cs#L16

csharp
button.Text = "Click me!";
button.EnableClientSideAPI = true;
button.Click += new EventHandler(button_Click);

xaf-win-add-custom-button-to-form-using-custom-view-item/VB/MySolution.Module.Web/ButtonDetailViewItemWeb.vb#L23

vb
button.Text = "Click me!"
button.EnableClientSideAPI = True
AddHandler button.Click, AddressOf button_Click

See Also

ClientInstanceName

ClientSideEvents

ASPxButton Class

ASPxButton Members

DevExpress.Web Namespace