Render the asp: markup from a WebControl

T

tommyw

Hi everybody,

I'm new to codecomments, but I really hope someone can help me.

I am dynamically loading custom controls and user controls into m
htmlform control. As I have a lot of "custom" data and controls to use
I am basically creating a string with the markup, usin
Page.ParseControl to obtain this as a control (with childcontrols) an
then adding the result to the form's control collection.

However, in order to maintain viewstate, what would be ideal would b
to actually write the <asp:control id=... runat=server markup of som
controls to this string that I am parsing and adding in the page'
OnInit event.

Does anyone have any idea how to, given an instance of a WebControl
write the asp.net markup as opposed to the resulting HTML markup?

I hope I have made myself at least slightly intelligible, and thank yo
very much in advance.

Tom


-
tommy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top