Save a String to Word

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top