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
I recommand you to use Spire.Doc to add password protection, so you generate word is readonly.
[link=http://www.e-iceblue.com/Introduce/word-for-net-introduce.html]http://www.e-iceblue.com/Introduce/word-for-net-introduce.html[/link]