Home > DeveloperSection > Forums > Response.write doesn't display image
Royce Roy
Royce Roy

Total Post:149

Posted on    June-11-2013 7:15 AM

 VB.Net VB.Net 

 1 Reply(s)
 1035  View(s)
Rate this:
Hi Mindstickians,

I want to display a generated image as following line of code in VB.NET

Response.Write("<img src='" & filepather & "'/>")

Where filepather is defined as the string to the image. It is the correct filepath, and I'm not getting the "broken image link" icon.

script inside an aspx page.

Have I forgotten something here? If I do


it works fine.

Your help is greatly appreciated.


Total Post:604

Posted on    June-12-2013 7:59 AM

Hi Royce,

Make sure filepather string contains the virtual address of the image not the physical address.

Like I have tested this and works fine.

Dim filePath As String = "http://localhost:2025/Styles/Images/logo.png"
Response.Write("<img src='" & filePath & "'/>")

Don't want to miss updates? Please click the below button!

Follow MindStick