Skip to main content
Tab

ASPxCallback.JSProperties Property

Enables you to supply any server data that can then be parsed on the client.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public Dictionary<string, object> JSProperties { get; }

Property Value

Type Description
Dictionary<String, Object>

The collection of property names and their values.

Remarks

In some instances, it is necessary to obtain server information on the client. The JSProperties property enables you to declare temporary client properties. The JSProperties property represents a collection of property names and their values. Once declared, a property can be accessed on the client.

Note

The only requirement is that property names must begin with the ‘cp’ prefix, to avoid rewriting the ASPxCallback‘s base properties.

<script type="text/javascript">
     function OnClick(s, e) {
          cb.PerformCallback();
     }
     function OnEndCallback(s, e) {
          mmoServerData.SetText(cb.cpText);
     }
</script>
...
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Get data from server" AutoPostBack="false">
     <ClientSideEvents Click="OnClick" />
</dx:ASPxButton>

<dx:ASPxMemo ID="ASPxMemo1" runat="server" Height="500px" Width="500px" ClientInstanceName="mmoServerData">
</dx:ASPxMemo>

<dx:ASPxCallback ID="ASPxCallback1" runat="server" ClientInstanceName="cb" OnCallback="ASPxCallback1_Callback">
     <ClientSideEvents EndCallback="OnEndCallback" />
</dx:ASPxCallback> 
See Also