Just so we're on the same page...
Here is a snippet of what I have that works right now:
Response.Clear();
Response.Charset ="";
//set the response mime type for excel
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment;filename=Filename.xls");
//create a string writer
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
//create an htmltextwriter which uses the stringwriter
System.Web.UI.HtmlTextWriter htmlWrite = new
System.Web.UI.HtmlTextWriter(stringWrite);
DataSet ds = Session["somedatagrid"]
DataGrid dg = new DataGrid();
//'instantiate a datagrid
dg.DataSource = ds.Tables[0];
dg.DataBind();
//tell the datagrid to render itself to our htmltextwriter
dg.RenderControl(htmlWrite);
//all that's left is to output the html
Response.Write(stringWrite.ToString());
/********************************/
//THIS IS WHERE THE OPEN/SAVE DIALOG WINDOW POPS UP
I want to essentially call the exact same snippet of code but use a
different dataset.
Can I do it this way....or any other way?
--
Thanks,
John Scott.
"Cor Ligthert [MVP]" wrote:
John,
You mean just is pseudo
mySaveDialog.showdialog
writexml("mysaveDialog.file)
mySaveDialog.showdialog
writexml("mysaveDialog.file)
Why not?
Cor