Need some help with an problem that bugging me..
I have to open a .doc file at the client side when the user clicks a button.
Opening is not a problem.. I am able to do it using the following code
which is executed when the user clicks on the button
byte imagecontent = (byte)(drd);
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment;filename=" + drd.GetValue(1).ToString());
The problem is that the user first sees a 'Open/ Save / Cancel' dialog box. Only when the user clicks on 'Open' does the .doc file get opened.
I am using following code but it does not working.
"window.open('E:\MyWork\Test\DownloadFiles\Reports\Rpt.pdf"','Report','height=520,width=730,toolbars=no,scrollbars=yes,resizable=yes');" + Environment.NewLine +
"</script>" + Environment.NewLine;
Am at a loss and any help will be appreciated.