PopupControl - MikhailTymchukDX/AppVeyorTest GitHub Wiki

PopupControlExtender (demo)

PopupControl is an ASP.NET AJAX extender that can be attached to any control to open a popup window that displays additional content. This popup window will probably be interactive and located within an ASP.NET AJAX UpdatePanel. So, it will perform complex server-based processing (including postbacks) without affecting the rest of the page. The popup window can contain any content including ASP.NET server controls, HTML elements, etc. Once work of the popup window is done, a simple server-side call dismisses it and triggers any relevant script on the client to run and update the page dynamically.

Properties

Name Description
CommitProperty Optional setting specifying a property of the control being extended that should be set with the result of the popup Remarks: If the property value is missing (an empty line), the default "value" property will be used
CommitScript Optional setting specifying an additional script to run after the result of the popup is set
ExtenderControlID The ID of the extender control
OffsetX The number of pixels to offset the Popup from its default position, as specified by Position
OffsetY The number of pixels to offset the Popup from its default position, as specified by Position
OnHide OnHide animation will be played each time the popup is hidden
OnShow OnShow animation will be played each time the popup is displayed. The popup will be positioned correctly but hidden. Animation can be used to display the popup with other visual effects
PopupControlID The ID of the control to display
Position Optional setting specifying where the popup should be positioned relative to the target control (Left, Right, Top, Bottom, or Center)

Methods

Cancel()

Cancels the popup control and hides it abandoning results

Commit(result)

Commits the popup control and hides it applying the specified result

Params:

  • result
    • Type: String
    • Description: Result

GetProxyForCurrentPopup(page)

Returns a proxy PopupControlExtender representing the currently active popup on the specified page

Only the Cancel and Commit methods should be called on the proxy Params:

  • page
    • Type: Page
    • Description: Page

Client properties

commitProperty

The property of a control being extended that should be set with the result of the popup

Getter name: get_commitProperty()

Setter name: set_commitProperty(value)

commitScript

An additional script to run after the result of the popup is set

Getter name: get_commitScript()

Setter name: set_commitScript(value)

extenderControlID

The ID of the extender control

Getter name: get_extenderControlID()

Setter name: set_extenderControlID(value)

offsetX

The number of pixels to horizontally offset the Popup from its default position

Getter name: get_offsetX()

Setter name: set_offsetX(value)

offsetY

The number of pixels to vertically offset the Popup from its default position

Getter name: get_offsetY()

Setter name: set_offsetY(value)

onHide

A JSON definition of generic OnHide Animation

Getter name: get_onHide()

Setter name: set_onHide(value)

onHideBehavior

Generic OnHide Animation behavior

Getter name: get_onHideBehavior()

onShow

A JSON definition of generic OnShow Animation

Getter name: get_onShow()

Setter name: set_onShow(value)

onShowBehavior

Generic OnShow Animation behavior

Getter name: get_onShowBehavior()

popupControlID

The ID of the control to display

Getter name: get_popupControlID()

Setter name: set_popupControlID(value)

popupVisible

Determines whether or not the popup is visible

Getter name: get_popupVisible()

position

Determines where the popup should be positioned relative to the target control (Left, Right, Top, Bottom, or Center)

Getter name: get_position()

Setter name: set_position(value)

Client methods

hidePopup()

Hides the popup

onHide()

Plays OnHide animation

onShow()

Plays OnShow animation

showPopup()

Shows the popup

Client events

hidden

Firs after the popup is hidden

Add event handler method: add_hidden(handler)

Remove event handler method: remove_hidden(handler)

Raise event method: raise_hidden()

hiding

Fires when the popup is being hidden

Add event handler method: add_hiding(handler)

Remove event handler method: remove_hiding(handler)

Raise event method: raise_hiding()

showing

Fires when the popup is being shown

Add event handler method: add_showing(handler)

Remove event handler method: remove_showing(handler)

Raise event method: raise_showing()

shown

Fires after the popup is shown

Add event handler method: add_shown(handler)

Remove event handler method: remove_shown(handler)

Raise event method: raise_shown()