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

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
 
M

mikebrengartner

Something like this:

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

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top