Save a String to Word

  • Thread starter Thread starter Ryan Ternier
  • Start date Start date
R

Ryan Ternier

I have a string I would like to save into a word doc, and throw the
document out to the user without saving it.

I've tried this using the REsponse object, but it will include the
ViewState control, and anything else I have on my page.

Any suggestions?

here's the code I tried:

Response.Clear();
Response.AddHeader("content-disposition", "inline;filename=Agenda.doc");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.word";
Response.Write(lblAgenda.Text);


Thx.
 
Back
Top