Hi,
I'm trying to open Word & Excel docs in a new browser window. The windows opens and then closes straight away. I think I may need browser plugins. Can someone provide some advice on how I can achieve this?
Here's my code:
From calling page:
Session["doctype"] = doctype;
Session["filepath"] = filepath;
ScriptManager.RegisterStartupScript(this.UpdatePanel3, this.GetType(), "docviewer",
"window.open('DocumentViewer.aspx','_blank')", true);
From new page:
protected void Page_Load(object sender, EventArgs e)
{
string filepath = Session["filepath"].ToString();
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=" + Path.GetFileName(filepath));
Response.AddHeader("content-disposition", "in ...
Go to the complete details ...