c# - Render a .NET Web Control from a string? -


Dynamically load a WebControl from a string with some tags in ASP.NET possible? For example, I have a string like the following:

  string controlTag = "& lt; asp: Label id = \" lblLabel \ "runat = \ "Server \" / & gt; ";  

Then I want to do something like this to load control from that string:

  WebControl webControl = LoadControlFromTagString (controlTag);  

I can simply parse the string and dynamically load the control in LoadControlFromTagString , but I was thinking that anything in it at NAT The advantage of i is manufactured Any suggestions?

There are several options depending on your control example (and how to do it)

The easiest possible: perhaps you have access to your current page example.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -