Using AxPopupParent& AxPopupChild Control

Using AxPopupParent and AxPopupChild controls

Reference: http://msdn.microsoft.com/en-us/library/cc592938.aspx

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");
            AxPopupParentControl1.OpenPopup(objMenuItem);

This will have your popup and parameter passing from it configured.
Integrating ASP.NET 2.0 application in Sharepoint
http://www.sharepointblogs.com/jscott/archive/2008/04/15/integrating-asp-net-2-0-web-pages-into-sharepoint-2007.aspx
http://geekswithblogs.net/RogueCoder/archive/2006/12/11/100889.aspx

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

Comments on this entry:

# re: Using AxPopupParent& AxPopupChild Control

Left by Precha at 7/26/2009 9:52 PM
Gravatar
Hello,
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
Gravatar
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:

 
«January»
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456