Popup Control for ASP.NET Web Forms - How to return values from the content page and close the pop-up window on the client or server
This example demonstrates how to add an editor to the popup control's ContentUrl page, get the editor's value, and close a pop-up window on the client or server.
On the parent page, create a popup control and specify its ContentUrl property. Add an input element to the page and handle its OnClick
event to invoke a pop-up window.
<input id="btnShowPopup" type="button" onclick="OnBtnShowPopupClick();" value="Show Popup" />
<dx:ASPxPopupControl ID="popup" runat="server" ClientInstanceName="popup"
ContentUrl="~/PopupContent.aspx" .../>
On the ContentUrlPage, create a text box editor and two buttons. Create the HidePopupAndShowInfo function that hides the pop-up window and displays the editor's value in an alert message. You can call that function on the client and server.
function HidePopupAndShowInfo(closedBy, returnValue) {
popup.Hide();
alert('Closed By: ' + closedBy + '\nReturn Value: ' + returnValue);
}
- Default.aspx (VB: Default.aspx)
- PopupContent.aspx (VB: PopupContent.aspx)
- PopupContent.aspx.cs (VB: PopupContent.aspx.vb)
- Popup Control for ASP.NET Web Forms - How to return values from the сontent сollection and close the pop-up window on the client or server
- Popup Control for ASP.NET Web Forms - How to pass a parameter from the content to parent page
- How to manipulate client-side objects on the popup control's ContentUrl page
- Splitter for ASP.NET Web Forms - How to return values from the ContentUrl page
(you will be redirected to DevExpress.com to submit your response)