473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

immage in datalist

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
2 940
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
hi my problem is when there is nmo image save in server I want the image will be invisibl

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Paul | last post by:
I am trying to use a DataList and the ItemTemplate. I am binding the Datalist to a SQL query that gives me a list of Items with a Parent Category. I want to loop through all the items, but...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
1
by: harithagowd | last post by:
how to access the immage in servlets which is stored in the same root directory
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.