Hi all!
I'm having troubles with dynamically adding some attributes to IMG tag within the asp:Panel.
Here is the code:
Code:
<asp:Panel ID="panelArea" runat="server">
<table border="0" width="100%">
<tr>
<td>
<asp:PlaceHolder ID="phArea" runat="server" />
</td>
<td>
<img id='<%= "tabImg" + ClientID %>' src='<%= ImageUrlOpen %>' />
</td>
</tr>
</table>
</asp:Panel>
The error I keep getting is
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Has anyone faced this problem earlier?
Thanks!
Aleksandar Dragosavac
Belgrade, Serbia