The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientProcessingModeEventArgs.processOnServer Property

Gets or sets a value that specifies whether the event should be finally processed on the server side.

Declaration

processOnServer: boolean

Property Value

Type Description
boolean

true to process the event on the server side; false to completely handle it on the client side.

Remarks

The processOnServer property enables you to specify where the current user action should be processed - either on the client side or on the server side. If this property is set to false in a client event's handler, the event is completely handled on the client side without a postback to the server. Setting the processOnServer property to true indicates that the final processing of the event should be performed on the server side, and so a round trip to the server is required. During such a round trip the corresponding server-side event is fired, which if handled, allows any desired server-side action to be performed.

Note

The default value of the processOnServer property depends on a couple of server conditions. Thus, true is passed to a certain client event handler's processOnServer property if either the corresponding server-side event (if any) has the assigned handler or a web control's AutoPostBack property is set to true. In other cases, processOnServer is set to false by default.

Examples

The complete sample project is available in the DevExpress Code Central database at E493.

...
         <dxe:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px" 
          ClientInstanceName="txtMain" ClientEnabled="False" Text="test message">
         </dxe:ASPxTextBox>
         <dxe:ASPxButton ID="ASPxButton1" runat="server" Text="Edit..." AutoPostBack="False">
             <ClientSideEvents Click="function(s, e) {
             txtPopup.SetText(txtMain.GetText());
              popupControl.Show();
         }" />
         </dxe:ASPxButton>
        <dxpc:ASPxPopupControl ID="ASPxPopupControl1" runat="server" 
                ClientInstanceName="popupControl" Height="83px" Modal="True" 
                CloseAction="CloseButton" Width="207px" 
    AllowDragging="True" PopupHorizontalAlign="WindowCenter" 
                PopupVerticalAlign="WindowCenter">
             <ContentCollection>
                 <dxpc:PopupControlContentControl runat="server">
                     Text:<dxe:ASPxTextBox ID="ASPxTextBox2" runat="server" Width="170px" 
                             ClientInstanceName="txtPopup">
                             </dxe:ASPxTextBox>
                             <br/><br/>
                     <table style="border:none">
                         <tr>
                             <td>
                                 <dxe:ASPxButton ID="btnOK" runat="server" 
                                     AutoPostBack="False" Text="OK" 
                                     Width="80px" OnClick="btnOK_Click">
                                     <ClientSideEvents Click="function(s, e) {
                                 popupControl.Hide();
                                  e.processOnServer = true; 
                            // do some processing at the server side
                              }" />
                                 </dxe:ASPxButton>
                             </td>
                             <td>
                                 <dxe:ASPxButton ID="btnCancel" runat="server" 
                                AutoPostBack="False" 
                                      ClientInstanceName="btnCancel"
                                     Text="Cancel" Width="80px">
                                     <ClientSideEvents Click="function(s, e) {
                                         popupControl.Hide();
                                      }" />
                                 </dxe:ASPxButton>
                             </td>
                         </tr>
                     </table>
                 </dxpc:PopupControlContentControl>
             </ContentCollection>
         </dxpc:ASPxPopupControl>
...
See Also