Click here to Skip to main content
11,928,078 members (45,102 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
Hello everyone,

I am rendering an page to html using PageRender. the problem is that the images in page doesnot get rendered, i mean after rendering to html file, when i open an html file i cant see the images there. the code i am using is as below:
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
        Dim sb As New StringBuilder()
        Dim hWriter As New HtmlTextWriter(New StringWriter(sb))
        Dim PageResult As String = sb.ToString()
        Dim file As New System.IO.StreamWriter(Server.MapPath("~\UploadedDocs\") & "InvoiceDetail" & Request.QueryString("ClientJobID") & ".html")
 End Sub
Can any one please guide me how to get image also

Thank you in advance
Posted 31-Jan-13 6:23am
Edited 31-Jan-13 6:25am
ryanb31 31-Jan-13 11:38am
Are the image placeholders there, you just don't see the image? What happens when you view the source html?
Jagdish.rkl 3-Feb-13 11:18am
yes i have the image placeholders there but image doesn't get displayed. it just displays the red cross over there. in html code i found it mentioning that file doesn't exists while the file exists in server.
it is how i am using it in my application to load the image

<img id="Img1" runat="server" src="../images/abc.jpg" border="0" height="50" width="90" alt="INTEC Office" />
ryanb31 4-Feb-13 7:48am
It sounds like the url for the image is wrong.
Gerenatian 31-Jan-13 12:06pm
I have the same question as ryan, Can you see the image placeholders. If so, it could be a problem how you are using the picture. Setting it as a resource / content could mean a big difference.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100