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

  • Thread starter Thread starter mikebrengartner
  • Start date Start date
M

mikebrengartner

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
 
Something like this:

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