Click here to Skip to main content
Rate this: bad
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 5:23am
Edited 31-Jan-13 5:25am
(no name)498K
ryanb31 at 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 at 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 at 4-Feb-13 7:48am
It sounds like the url for the image is wrong.
Gerenatian at 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
0 OriginalGriff 575
1 George Jonsson 285
2 Garth J Lancaster 280
3 Sergey Alexandrovich Kryukov 264
4 Maciej Los 250
0 Sergey Alexandrovich Kryukov 10,879
1 OriginalGriff 5,555
2 Maciej Los 5,534
3 CPallini 3,819
4 BillWoodruff 3,594

Advertise | Privacy | Mobile
Web04 | 2.8.141030.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2014
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