I have a web form in which I have a datagrid, I need to export this data to
a Microsoft Excel sheet.
I'm doing it thus:
Response.Clear( );
Response.Buffer = true;
Response.Conten tType = "applicatio n/vnd.ms-excel";
Response.Charse t = "";
this.EnableView State = false;
System.IO.Strin gWriter oStringWriter = new System.IO.Strin gWriter();
System.Web.UI.H tmlTextWriter oHtmlTextWriter = new
System.Web.UI.H tmlTextWriter(o StringWriter);
DataGrid1.Rende rControl(oHtmlT extWriter);
Response.Write( oStringWriter.T oString());
Response.End();
But I'd like to avoid system ask user if desires open or save this file,
instead would open excel sheet as another window and when user saves the
file it be saved as an excel file.
Does somebody knows how achieve this?
I'll appreciate it very much.
A.L.
--
see07 - forum member
http://www.visual-basic-data-mining.net/forum