user1886951
user1886951

Reputation:

image url of some kind

I have 2 lines like this:

<img height="100" width="100" src="../uploadimages/18-2-2013-23-33-01-Lighthouse.jpg">

<asp:Image id="img_prev" name="img_prev" src="" Height="80" Width="100" runat="server" />
img_prev.ImageUrl = "../uploadimages/18-2-2013-23-33-01-Lighthouse.jpg"

I try to show image in 2 html image and .net image, in html code its shows goods, but in .net image it can not show to image.

Upvotes: 0

Views: 140

Answers (2)

user885100
user885100

Reputation:

Is there a reason that you are trying to use the asp image control? Typically, you would only want to use that if you have a need to access the control on the server side.

try this.

img_prev.ImageUrl = "~/folder/filename";

Upvotes: 0

cdev
cdev

Reputation: 5411

try with this

<asp:Image id="Img1" runat="server" Height="80" Width="100" ImageUrl="../uploadimages/18-2-2013-23-33-01-Lighthouse.jpg" />

or remove src=""

Upvotes: 2

Related Questions