Using AxPopupParent& AxPopupChild Control

Using AxPopupParent and AxPopupChild controls


Configuring the Parent:
  • Add the "AxPopupParentControl"  to the AxUserControl which is supposed to host the Popup.
  • Specify the "Height" & "Width" of the Popup to be created by giving the appropriate values to the control
  • Generally a dialog form returns a value - create a holder for this expected return value by creating a field in the "Fields" property of the "AxPopupParentControl". Assuming one field "Field1" for the current case.
  • Go to the "Events"  of the control and specify the "onpopupclosed" event handler on the control.
  • In the event handler add the code to accept the value from the popup by using the parent popupcontrol
string strReturnValue = AxPopupParentControl1.GetFieldValue("Field1");

Configuring the Child (Dialog/Popup):
  • Create a AxUserControl with the content intended to be displayed in the Popup just as any regulat EP AxWebUserControl would be developed
  • Additionally add the "AxPopupChildControl" and specify the Field that has to be passed from the Child
<dynamics:AxPopupField Name="Field1" TargetControlId="Field1ValueTextBox" />
  • The markup should be similar to the above. The TargetControlID refers the ID of the control that hold the value to be passed from the popup back to the parent. (For other method of passing value check the MSDN link above)
  • Add the user control to the AOT and create a page in EP that uses the web control
  • Create an AX Web Menu Item that refers to this page and deploy the page.
  • Back in the Parent user control's code behind file (ascx.cs file) use the following code to invoke the popup.
 AxUrlMenuItem objMenuItem = new AxUrlMenuItem("WebMenuItemLinkingThePopupPage");

This will have your popup and parameter passing from it configured.
Integrating ASP.NET 2.0 application in Sharepoint

Coming soon !!
posted @ Tuesday, September 23, 2008 5:40 AM

Comments on this entry:

# re: Using AxPopupParent& AxPopupChild Control

Left by Precha at 7/26/2009 9:52 PM
Could we use the Label(not the textbox) in the parent's page to get the value from child page?

# re: Using AxPopupParent& AxPopupChild Control

Left by カジノ at 12/15/2010 10:59 PM
I was searching on the web for the same thing, found..but couldn’t figure out how to run..I did have problems with this so plz solve my problem..

Your comment:

(not displayed)


Live Comment Preview: