Setting id to a panel control in gridview
- by mariki
I have a panel control in gridview's template.
I need to hide/unhide panel in javascript function, for that i need to pass panel's id to the javascript.
The problem is that all panels have the same id in gridview, so I need to set unique id to each panel.
I tried to do:
<asp:Panel id= "Panel_<%# Eval("ID")%>"
and some other variations but always get an error.
The panel contains some other controls, I need it to be server side because I need to set at code-behind (after checking if user is authenticated)
What can I do?
p.s.
It doesn't have to be Panel, any other control that I can find with Findcontrol and can hold other controls.