M
mahsa
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?
<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?