About Me

My photo
a Dynamic and Energetic guy.....

Friday, October 21, 2011

SharePoint 2010 close the popup and redirect parent

In SharePoint 2010 we have popup windows in many places.

If we need to close the PopUp and redirect the parent to a new page or reload the PopUp we can use simple code :)

Server side Code In the POPUP page
string redirectUrl = ResourceWrapper.GetAAFResource("PopupMyApprovalsLink");
Response.Write("script type='text/javascript'>window.frameElement.navigateParent('"+ redirectUrl +"'));
also we can use,
Response.Write("script type='text/javascript'>window.frameElement.commitPopup()");
to close the PopUp

1 comment:

My Masters