Close Module Dialog SharePoint from server side Code and javascript
Javascript
C#
//current Context
HttpContext Currentcontext = HttpContext.Current;
//Checking dialog is open on this page or not
if (HttpContext.Current.Request.QueryString["IsDlg"] != null)
{
//executing javascript for closing pop on runtime;
Currentcontext.Response.Write("");
Currentcontext.Response.Flush();
Currentcontext.Response.End();
}
from update panel
///
/// Call Runtime Javascript Functions
///
/// type Complete Function and js Code
private void CallJavaScriptMethods(string Script)
{
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), Guid.NewGuid().ToString(), Script, true);
}
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), Guid.NewGuid().ToString(), "window.frameElement.commitPopup();", true);
SharePoint 2010 Close Module Dialog through code
Sunday, June 2, 2013
Posted by Usama Wahab Khan at 6:20 AM
Labels: SharePoint 2010
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment