shouldn't this work?

Discussion in 'ASP .Net' started by Guest, Mar 21, 2007.

  1. Guest

    Guest Guest

    hey all,
    i have a gridview with an image inside an item template. the imageUrl
    property looks like this:

    (Eval("Gender")=="Unknown")?"~/images/failed.png":"~/images/success.png"

    for some reason it always evaluates false which isn't the case for all my
    values. any ideas?

    thanks,
    rodchar
     
    Guest, Mar 21, 2007
    #1
    1. Advertisements

  2. cast the eval to a string

    ((string)Eval("Gender"))==...
     
    Alexey Smirnov, Mar 21, 2007
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Thank you very much.

     
    Guest, Mar 22, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.