Re: Images on server.
- From: "rcoco" <nclauder@xxxxxxxx>
- Date: 12 Apr 2007 23:01:52 -0700
On Apr 12, 5:33 pm, "Alexey Smirnov" <alexey.smir...@xxxxxxxxx> wrote:
On Apr 12, 11:20 am, "rcoco" <nclau...@xxxxxxxx> wrote:Thanks Alexey,
Thanks Alexey for the help and for the patience.
The code
Image URL is: <%# "/Images/" +
((string)DataBinder.Eval(Container.DataItem, "MoodToday") == "Bad
Mood" ? "sad" : "laughing") + ".gif" %>
I get the error Specified cast is not valid at run time.
And when I changed the code to
<asp:Image id=Image1 runat="server" ImageUrl='<
%#DataBinder.Eval(Container.DataItem,"MoodToday")=="Bad
Mood"?"sad":"laughing" )+".gif"%>' Visible="True">
</asp:Image>
Only the Image laughing .gif appears whether Good Mood or Bad Mood is
selected.
Why is it so?
Have you tried to debug it?
Put this line as I already told you
Current Mood in the database is: ***<%#
DataBinder.Eval(Container.DataItem, "MoodToday") %>***
If you believe that a "Bad Mood" is selected (it has to be saved(!))
then you will see
***Bad Mood***
Otherwise you will see
***Good Mood***
***abracadabra***
******
and so on- Hide quoted text -
- Show quoted text -
It has worked properly. I had to select Bad Mood By default like you
had advised me.
I Really Want to thank you so so much it has worked so well. Thank you
especially for yo patience it's unusial.
Thanks again and to the rest who helped me in giving me a clou.
.
- Follow-Ups:
- Re: Images on server.
- From: rcoco
- Re: Images on server.
- References:
- Re: Images on server.
- From: rcoco
- Re: Images on server.
- From: Alexey Smirnov
- Re: Images on server.
- From: rcoco
- Re: Images on server.
- From: Mark Rae
- Re: Images on server.
- From: rcoco
- Re: Images on server.
- From: Larry Bud
- Re: Images on server.
- From: Mark Rae
- Re: Images on server.
- From: Alexey Smirnov
- Re: Images on server.
- From: Mark Rae
- Re: Images on server.
- From: rcoco
- Re: Images on server.
- From: Alexey Smirnov
- Re: Images on server.
- Prev by Date: Re: Menu Template Problem
- Next by Date: Re: Problem with Focus method with iehp.exe on thin client
- Previous by thread: Re: Images on server.
- Next by thread: Re: Images on server.
- Index(es):
Relevant Pages
|