By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

immage in datalist

P: n/a
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\rooms cenes\"+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\"+str FileName+"_ss.jpg"))
if (fi.Exists
{do some thing
it shows the currect answer how can I use it in image tag?
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


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

"mahsa" <an*******@discussions.microsoft.com> wrote in message
news:42**********************************@microsof t.com...
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\rooms cenes\"+DataBinder.Eval(Co
ntainer.DataItem, "PartNo")+"_ss.jpg") %>' runat="server" ID="Image1" /> but it always return visible=false
when i use
FileInfo fi = new FileInfo(Server.MapPath(@"\images\roomscenes\"+str FileName+"_ss.jpg")); if (fi.Exists)
{do some thing}
it shows the currect answer how can I use it in image tag?

Nov 18 '05 #2

P: n/a
hi my problem is when there is nmo image save in server I want the image will be invisibl

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.