Include code inside repeater

A

Arjen

Hi,

I want to do add an if statement (C#) inside my itemtemplate.

Something like this:
<ItemTemplate>
IF (true)
...<td><asp:HyperLink...
ELSE
...<td><asp:HyperLink...
</ItemTemplate>

How can I do this?

Thanks!
 
E

Eliyahu Goldin

The way of doing this sort of things is to put all controls in the template
and hide/show them by either databinding Visible property or setting Visible
property in ItamDataBound event.

Eliyahu
 

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,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top