ASPxPopupControl - Client-Side Functionality

Submit
Description
C#
VB
ASPX
JS

This example demonstrates how to manipulate a popup control programmatically on the client using our extended client-side functionality. The client-side programmatic interface is available if the EnableClientSideAPI property is set to true, or if there is a handler assigned to any client-side event.

In this demo, each popup control window is identified using its Name property. In order to obtain a specific popup window by its name on the client side, the GetWindowByName method is used. A specific popup window can be invoked or hidden on the client side by using the ShowWindow or HideWindow metod. (See JS code, the SetHintVisible function)

In order to show or hide a default window, the Show or Hide method can be used. (See JS code, the SetErrorVisible function)

The SetContentHTML method is used in this demo to display the HTML code representing the default popup window's content (see JS code, the SetErrorString function). The content of a specific popup window can be obtained on the client side via the GetWindowContentHTML method and defined via the SetWindowContentHTML method.

Note that an individual client control object can be referenced either directly by its ID (for instance, by using the following code: ASPxPopupControl1.IsVisible()) or by using the Get method of a common collection for our ASPx web controls (this can be useful when our web control is contained within a UserControl or MasterPage; that is when the resulting client identificator is generated by a specific naming container). The GetPopupControl function (see JS code) demonstrates how to access a client popup control object via our control collection.

<