Include code inside repeater

  • Thread starter Thread starter Arjen
  • Start date Start date
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!
 
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

Back
Top