CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    55

    export images within div tag to word

    Hi,
    I am exporting a page word.Below code works but it does not export images present along with content haw can i export with images?
    i am using this code

    Code:
    btnExport_Click(object sender, EventArgs e)
    {
    Response.AddHeader("content-disposition", "attachment;filename=FileName.doc");
    Response.Charset = "";
    Response.Cache.SetCacheability(HttpCacheability.NoCache);
    Response.ContentType = "application/vnd.ms-word";
    
    System.IO.StringWriter stringWrite = new System.IO.StringWriter();
    System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
    
    print_All.RenderControl(htmlWrite);
    Response.Write(stringWrite.ToString());
    Response.End();
    }
    Last edited by HanneSThEGreaT; June 21st, 2010 at 08:51 AM.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: export images within div tag to word

    btkaruna, please use either [CODE] or [PHP] tags when posting code. You have been a member for 6 years, you should know how it works.

    Thank you

    Hannes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured