views:

7

answers:

0

I have a user control called "MyLabel". When combined with a tagPrefix in my web.config, I would add the source code to an aspx page as follows:

<sr:MyLabel ID="lblCopyright" runat="server" ResourceKey="Copyright" />

Now, instead of entering this in the aspx, I would like to keep this code string in the database, and in the codebehind, generate the html string as this control would normally render. However, when I just append this to say a literal, not surprisingly, the control doesn't render, and just spits out the code string as is.

This will be for many different types of user controls, and I'm hoping for a simple render control solution that doesn't require Load Control of an ascx, nor manual boxing castings.

I just want the above code string to render into an html string dynamically.

Is this possible?