I'm using Response.BinaryWrite to display a Word doc and no matter what I do, it always opens up an instance of MS Word. I need it to open this word doc within IE because it's on a page with two frames where one side will have certain information about the document and the other frame should display the content of the word document.
Here is the code I currently have:
temp = (byte[])myDataReader.GetSqlBinary(1);
Response.Buffer = true;
Response.Clear();
Response.ContentType = "application/msword";
Response.AddHeader("Content-Disposition", "inline; filename=myfile.doc");
Response.BinaryWrite(temp);
Response.Flush();
Here is the code I currently have:
temp = (byte[])myDataReader.GetSqlBinary(1);
Response.Buffer = true;
Response.Clear();
Response.ContentType = "application/msword";
Response.AddHeader("Content-Disposition", "inline; filename=myfile.doc");
Response.BinaryWrite(temp);
Response.Flush();