private void CloseDlg()
{
try
{
HttpContext context = HttpContext.Current;
string strSelUser = string.Empty;
if (HttpContext.Current.Request.QueryString["IsDlg"] != null)
{
context.Response.Write("<script type=\"text/javascript\">window.frameElement.commonModalDialogClose(0, 'cancelled');</script>");
context.Response.Flush();
context.Response.End();
this.Page.Response.End();
}
else
{
Response.Redirect(SPContext.Current.Web.Url);
}
}
catch { }
}
Call this function where you want to and you will get the cancelled as text on parent page.
No comments :
Post a Comment