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 !!