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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -