Author: dockies | Posted on: 7/15/2008 2:57:23 AM | Views : 426

Hi,

I am using Asp.Net 2.0 C# and i am developing a printable form.
I am using the code below to export my page to word or excel:
 1 // For Direct Exporting From HTML to Word
2 // Call this function on Button Click , pls include the required system.web namespaces
3
4 HttpContext.Current.Response.Buffer = true;
5 HttpContext.Current.Response.ContentType = "application/vnd-ms.word";
6
7 ///uncomment the 1st line if you want to open directly in IE and comment the 2nd line
8 //HttpContext.Current.Response.AddHeader("content-disposition", "inline; filename=ExportWord.doc");
9 HttpCon ...

Go to the complete details ...