SharePoint 2010, a new feature added to a dialogue. With the help of this, the user remains on the same page and to access information without leaving the current page. So there are ways we can close the dialog box code in different ways. These are mainly used implementations of JavaScript and behind the code.
Javascript:
Code-Behind:
- HttpContext context = HttpContext.Current;
- if (HttpContext.Current.Request.QueryString["IsDlg"] != null){
- context.Response.Write(");
- context.Response.Flush();
- context.Response.End();
- }
The framework of dialogue recognizes an additional parameter in the query named "IsDlg = 1", which says that to open the page in the dialog box. Therefore, in the underlying code only checks the query string parameters and if it exists, then calls the JavaScript method mentioned above, writing in the browser. So when does the dialog will close.
This is a very nice tip, which helps some custom implementations. Hope that helps.
SPONSORS:
No comments:
Post a Comment