immage in datalist

G

Guest

hi I use the image in datalis
<asp:Imag
ImageUrl='<%#Server.MapPath(@"\images\roomscenes\"+DataBinder.Eval(Container.DataItem, "PartNo")+"_ss.jpg") %>' Visible='<%#!System.IO.File.Exists(@"\images\roomscenes\"+DataBinder.Eval(Container.DataItem, "PartNo")+"_ss.jpg") %>' runat="server" ID="Image1" /
but it always return visible=fals
when i use
FileInfo fi = new FileInfo(Server.MapPath(@"\images\roomscenes\"+strFileName+"_ss.jpg"))
if (fi.Exists
{do some thing
it shows the currect answer how can I use it in image tag?
 
R

Rick Spiewak

It looks like you're using C#, you may need a ";" at the end of your binding
statement?

mahsa said:
hi I use the image in datalist
<asp:Image
ImageUrl='<%#Server.MapPath(@"\images\roomscenes\"+DataBinder.Eval(Container
..DataItem, "PartNo")+"_ss.jpg") %>'
Visible='<%#!System.IO.File.Exists(@"\images\roomscenes\"+DataBinder.Eval(Co
ntainer.DataItem, "PartNo")+"_ss.jpg") %>' runat="server" ID="Image1" />
 
G

Guest

hi my problem is when there is nmo image save in server I want the image will be invisibl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top