immage in datalist

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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" />
 
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

Back
Top