Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

PopupControl

MikhailTymchukDX edited this page Apr 29, 2016 · 2 revisions

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

Name Description
Cancel() Cancels the popup control and hides it abandoning results
Commit(result) Commits the popup control and hides it applying the specified result
GetProxyForCurrentPopup(page) Returns a proxy PopupControlExtender representing the currently active popup on the specified page

Client properties

Name Description
commitProperty The property of a control being extended that should be set with the result of the popup
commitScript 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 horizontally offset the Popup from its default position
offsetY The number of pixels to vertically offset the Popup from its default position
onHide A JSON definition of generic OnHide Animation
onHideBehavior Generic OnHide Animation behavior
onShow A JSON definition of generic OnShow Animation
onShowBehavior Generic OnShow Animation behavior
popupControlID The ID of the control to display
popupVisible Determines whether or not the popup is visible
position Determines where the popup should be positioned relative to the target control (Left, Right, Top, Bottom, or Center)

Client methods

Name Description
hidePopup() Hides the popup
onHide() Plays OnHide animation
onShow() Plays OnShow animation
showPopup() Shows the popup

Client events

Name Description
hidden Firs after the popup is hidden
hiding Fires when the popup is being hidden
showing Fires when the popup is being shown
shown Fires after the popup is shown

Client properties

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()

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()

popupControlID

The ID of the control to display

Getter name: get_popupControlID()
Setter name: set_popupControlID(value)

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)

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)

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)

popupVisible

Determines whether or not the popup is visible

Getter name: get_popupVisible()

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

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

Params:

  • page
    • Type: Page
    • Description: Page

Client methods

showPopup()

Shows the popup

hidePopup()

Hides the popup

onShow()

Plays OnShow animation

onHide()

Plays OnHide animation

Client events

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()

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()

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()

Clone this wiki locally