I'm using RenderControl(writer)
on a set of ASP.NET controls to get the generated server control markup back, for a template. These are form controls, such as radioboxes, input boxes, checkboxes.
The problem with this is the control's Parent.UniqueId
is not set at this point, not Parent.Parent and so on. This means that the name=""
attribute is never set, breaking the ViewState.
Is there any way to generate server control markup, and have the naming intact so that the ViewState
will automatically work?