C
chandra82_tech
Hi,
I have implemented export to excel functionality, which actually
exports the contents of HTML table to a excel sheet and asks for user
input on whether to open or save or cancel. The issue is when the user
clicks on "Open", the excel is opened in the same window where it is
being called or initiated, can i make it open in a new window?
Right now this how my code looks,
Context.Response.Clear();
//for displaying the open save dialogue box.
Context.Response.AddHeader("content-disposition",
"inline;filename=ExportContents");
Context.Response.Charset = "";
//set the target file type as excel.
Context.Response.ContentType = "application/vnd.ms-excel";
and i'm using a StringBuilder class to get all the information from my
HTML table and exporting to the excel by the following code,
//write to the excel sheet
Context.Response.Write(sb.ToString());
Context.Response.End();
-Chandra
I have implemented export to excel functionality, which actually
exports the contents of HTML table to a excel sheet and asks for user
input on whether to open or save or cancel. The issue is when the user
clicks on "Open", the excel is opened in the same window where it is
being called or initiated, can i make it open in a new window?
Right now this how my code looks,
Context.Response.Clear();
//for displaying the open save dialogue box.
Context.Response.AddHeader("content-disposition",
"inline;filename=ExportContents");
Context.Response.Charset = "";
//set the target file type as excel.
Context.Response.ContentType = "application/vnd.ms-excel";
and i'm using a StringBuilder class to get all the information from my
HTML table and exporting to the excel by the following code,
//write to the excel sheet
Context.Response.Write(sb.ToString());
Context.Response.End();
-Chandra