Re: Images on server.



On Apr 12, 5:33 pm, "Alexey Smirnov" <alexey.smir...@xxxxxxxxx> wrote:
On Apr 12, 11:20 am, "rcoco" <nclau...@xxxxxxxx> wrote:





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 -
Thanks Alexey,
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.

.



Relevant Pages

  • Re: Doodles Screensaver
    ... it to Doodle. ... I'm currently not in the mood to debug it ... Please remove all characters left of the "R" in my email address ...
    (comp.os.os2.bugs)
  • Re: What is code review? (Java code review)
    ... the systems to be found behave incorrectly one or two years later, because it is different branch people to debug and maintain the software. ... nobody will pay attention to who was the original author of that Java class and that person should be blamed. ... But I will never expect good mood between him and me. ... has always been paramount. ...
    (comp.lang.java.programmer)
  • lew? 2 qq
    ... program does dump there is written for you to debug by? ... Sometimes I'm in a good mood. ... white, Irish bottom. ...
    (comp.lang.java.help)