1

I'd have a repeater with some group logic inside. Basically, on the ItemDataBound method, I show or hide some controls inside the item.

But I've a problem, I want to add a header group template (and footer) : < ul> and < /ul>

For example, the following code :

<ul id="UlControl" runat="server"><asp:Label id (....) </ul> 

and then (in the databound method)

UlControl.Visible = false; 

Result : All the html code inside < ul> / < /ul> will be hidden.

I tryied to put a and inside an html < ul> but asp .net will auto close the < ul>.

I think about a placeholder but is it possible to add some code without validation ?

Regards

P. Sohm
  • 2,842
  • 2
  • 44
  • 77
  • 1
    How about doing the `.Visible=` only on the part that you want to hide which I assume is inside the
      ?
    – ub1k Jun 20 '11 at 08:35
  • Why don't you just set the visibility in the code-behind? Why does it have to happen whilst data-binding? – Mantorok Jun 20 '11 at 09:01
  • Is this any use to you? http://stackoverflow.com/questions/3736415/how-can-i-create-a-custom-repeater-that-displays-header-footer-based-on-properti – Town Jun 20 '11 at 09:25

0 Answers0