Hi,
a few weeks ago I had started a thread "Can't dynamically add controls
because of <%...%> code blocks". The error mentioned keeps me from inserting
an automatically generated navigation menu at the top of some pages. My
pages contain some <%= %> sections as well as sometimes <%# %> sections. Now
I have two questions:
a) Do <%# %> blocks also generate this error? In that case I couldn't use
the RepeaterControl anymore if I wanted to have my navigation menu.
b) To get rid of the error I want to replace my <%= %> blocks with server
controls. Here's the question: These blocks generate controls. How can I
possibly replace them in the header section by WHAT?
Here's a simplified example:
.aspx:
<%= generateHeader("Test.something") + generateHeader("Foo.something") %>
------
.aspx.cs:
string generateHeader(string filename)
{
return "<link href=\""+filename+"\"";
}
Axel Dahmen