http://blog.startq.com/index.php/2013/03/28/prevent-multiple-tabs-on-c-web-applications/
http://stackoverflow.com/questions/10336312/asp-net-c-sharp-avoid-open-the-same-window-twice
http://www.codeproject.com/Articles/35859/Detect-and-prevent-multiple-windows-or-tab-usage-i
http://jinaldesai.net/stop-sharing-session-state-between-multiple-tabs-of-browser/
http://stackoverflow.com/questions/10336312/asp-net-c-sharp-avoid-open-the-same-window-twice
http://www.codeproject.com/Articles/35859/Detect-and-prevent-multiple-windows-or-tab-usage-i
http://jinaldesai.net/stop-sharing-session-state-between-multiple-tabs-of-browser/
Window features in window.open()
The table below lists the string features you can pass into the "feature
" parameter of window.open()
to manipulate its interface. Most features support a value of true
or false
,
though in general, simply including the name of the feature implies it
should be added to the window (yes), while not including it means it
shouldn't (no). Separate each feature with a comma (,).Feature | Description |
channelmode |
Specifies if window should be opened in channel mode. IE only. |
fullscreen |
Specifies if window should be opened in full screen mode. IE only. |
height |
Specifies the height of the window. |
left |
Specifies the x coordinates of the window in pixels. IE only. See "screenX " as well. |
location |
Specifies if the location bar of the window should be included. |
menubar |
Specifies if the menu bar of the window should be included. |
resizable |
Specifies if window should be resizable. |
screenX |
Specifies the x coordinates of the window in pixels. NS only. See "left " as well. |
screenY |
Specifies the y coordinates of the window in pixels. NS only. See "top " as well. |
scrollbars |
Specifies if window should contain scrollbars |
status |
Specifies if the status bar of the window should be included |
toolbar |
Specifies if the toolbar of the window (i.e., reload button) should be included. |
top |
Specifies the y coordinates of the window in pixels. IE only. See "screenY " as well. |
width |
Specifies the width of the window. |
WORD DOCUMENT CREATION WITH TEMPLATE
ReplyDeletehttp://codemine.net/post/Export-to-word-From-AspNet
public void Sendb(string name, string desig, string divi, string s)
{
try
{
System.Text.StringBuilder Row_Template = new System.Text.StringBuilder();
Row_Template.Append("");
Row_Template.Append("{0}");
Row_Template.Append("{1}");
Row_Template.Append("{2}");
foreach (DataRow dr in gvbdate.Rows)
{
string WordDoc_RowCollection = "";
name = dr[1].ToString();
desig = dr[2].ToString();
divi = dr[3].ToString();
s = Convert.ToDateTime(dr[2]).ToString("d MMMM");
WordDoc_RowCollection += string.Format(Row_Template.ToString(), name, desig, divi, s);
}
Response.Clear();
Response.ClearHeaders();
Response.Charset = "";
string attachment = "attachment; filename=MYwordDocTemplate.Doc";
Response.ClearContent();
Response.AppendHeader("content-disposition", attachment);
Response.ContentType = "application/vnd.ms-word";
Response.BufferOutput = false;
//System.IO.StringWriter tw = new System.IO.StringWriter();
//System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
//DG.RenderControl(hw);
//Word_Doc = string.Format(Word_Doc, WordDoc_RowCollection);
//Response.Write(Word_Doc);
Response.End();
}
catch(Exception ex)
{
throw ex;
}
}