3.5 ListView - How do I do conditional logic the right way?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mikebrengartner@gmail.com

    #1

    3.5 ListView - How do I do conditional logic the right way?

    Hi all,
    I've got a data bound list view that I'm trying to work with. I'm
    trying to fill out the item template with a table row that displays a
    link to a file if the job status is complete. I've found that using
    Eval won't work, since it is only applicable to databound items, not
    for conditional logic.

    What's the right way to do this? My guess is that I need to trap an
    event off the listview and do it as it builds, but the obvious choices
    don't seem to be appropriate.

    Any thoughts?

    Thanks in advance,
    Mike
  • mikebrengartner@gmail.com

    #2
    Re: 3.5 ListView - How do I do conditional logic the right way?

    Something like this:

    if (Eval("Status") == "Complete")
    {
    <a href="sompath.f ile">File Name</a>
    }
    else
    leave blank

    Comment

    Working...