ASP.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 1733
Number of posts: 3304

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
export asp.net page to word Posted by rikb53 on 7 Aug 2009 at 6:22 AM
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.
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()
Report
Re: export asp.net page to word Posted by harrypeter86 on 29 Jul 2010 at 7:37 PM
for exporting asp.net page to word, If you want to add readonly protection,
I recommand you to use Spire.Doc to add password protection, so you generate word is readonly.

http://www.e-iceblue.com/Introduce/word-for-net-introduce.html




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.