export asp.net page to word - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

export asp.net page to word

rikb53rikb53 Posts: 64Member
i'm exporting my whole web page wrapped in a asp:panel to word.
what i would like to know is, is there a way that i can make the exporting word.doc a "read only" .doc? any help is appreciated.
[code]
Response.Clear()
Response.Buffer = True
Response.ContentType = "Application/vnd.ms-word"
Response.ContentEncoding = System.Text.Encoding.Default
Response.AddHeader("Content- Disposition", "attachment;filename=Rpt.doc")
EnableViewState = False
Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter)
pnMyPanel.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.Flush()
Response.Close()
[/code]

Comments

Sign In or Register to comment.