.net - While creating word document from html in c#,header image is taking relative path instead of ambeded object -


i creating word document html. follwoing little code part

strbody.append("<div class='section1'>                                                                                                                                  " +                                 "    <table id='hrdftrtbl' border='0' cellspacing='0' cellpadding='0'>                                                                                       " +                                 "    <tr><td>" +                                 "<div style='mso-element:header' id=h1 >                                                                                                 " +                                 "        <!-- header-tags -->    " +                                 "         <p class='msoheader' ><img width='796'  src='" + headerimgpath + "'/></p>  " +                                 "        <!-- end header-tags -->                                                                                                                            " +                                 "        </div>                                                                                                                                              " +                                 "    </td></tr>                                                                                                                                                   " +                                 "    <tr><td>" +                                 "      <div style='mso-element:footer' id=f1>" +                                 "        <!-- footer-tags -->                                                                                                                                " +                                 "        <p class='msofooter'>" +                                 "           <img width='796' src='" + footerimgpath + "'/>" +                                 "<!-- end footer-tags -->" +                                 " </p>   " +                                 "       </div>                                                                                                                                                     " +                                 "    </td></tr>                                                                                                                                              " +                                 "    </table>                                                                                                                                                " +                                 "</div>                                                                                                                                                      " +                                 "</body></html>")   response.appendheader("content-type", "application/msword"); response.appendheader("content-disposition", "attachment; filename=" + filename); response.write(strbody); 

here headerimgpath localhost relative url image. once create word document, header image should embedded inside word document itself. how referring localhost path, being failed on other system. how can attach header image embedded object?

i have question too, think there no way. can use word content generation dll (bad way, not crosswordversions), or share img in internet , use internet link (not good, internet requared), can put image in strong hierarchy directories , use relative path ..\..\dir\img (i use this, has problems doc moving).


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

python - Django-cities exits with "killed" -

python - How to get a widget position inside it's layout in Kivy? -