Image does not bind imageurl

Posted by Vanchi050585 under Regular Expressions on 8/7/2010 | Views : 5853 | Status : [Member] | Replies : 2
hi friends,

I am using asp:image to bind image in datalist itemTemplate. but it does not bind i mean the image does not displayed.
my source is:

<asp:Image ID="imgPhoto" runat="server" ImageUrl='<%#Eval("Images") %>' Width ="90px" Height ="100px"/>

pls anybody tell me any mistake.

Thanks

Thanks
tvn



Responses

Posted by: Shankul2784 on: 8/7/2010 [Member] Bronze

Up
0
Down

Hi,

For image path URL, you have to give full path. If you are using only file name then it will not show you the image.

e.g. if you page on root directory & image is in image golder then it should be like this -

<asp:Image ID="imgPhoto" runat="server" ImageUrl='image/yourimagename.gif' Width ="90px" Height ="100px"/>

not only the image name.


I hope, it will help you.




Thanks & Regards,

Shailesh

Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 8/9/2010 [Member] Bronze

Up
0
Down


Here u have to give the image physical path location on the server as "~/images/1.gif" should be like this

Thanks
Pavan Kumar
Mark Answer if this fits the need

Vanchi050585, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response