c# - Is it possible to dynamically add embedded code blocks to asp.net page similar to how controls are added dynamically from code? -


one can dynamically add controls asp.net page.

    label mylabel = new label();     mylabel.text = "sample label";     panel1.controls.add(mylabel);   

i want know if possible add embedded code blocks dynamically?

if code below, embedded code rendered literally.

    // use <%#page.title%> or <%=page.title%> example     literalcontrol literal = new literalcontrol("<%=page.title%>");      panel1.controls.add(literal);   

the output of above code be

<%=page.title%>

is there way make asp.net evaluate embedded code blocks added dynamically?

literalcontrol literalcontols = new literalcontrol(); literalcontols.text = page.title;  this.masterform.controls.add(literalcontols); 

enter image description here


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -