tl:dr version:
Is there a way to get the panels to render as divs when rendered by RenderControl?
Background:
I am working on an asp.net 1.1 site, and I am trying to render a control containing panels to a string so I can pass it back to the page as JSON and refresh part of the page.
I am rendering the control thusly:
StringWriter twHeader = new StringWriter();
Html32TextWriter HeaderWriter = new Html32TextWriter(twHeader);
MyHeader.RenderControl(HeaderWriter);
HeaderWriter.Close();
string HeaderHtml = twHeader.ToString()
When navigating to a page containing a MyHeader control, the panels within that control are rendered as divs. However, when I call RenderControl on MyHeader, the panels are rendered as tables, so when the page is updated with HeaderHtml, the layout blows up.
Is there a way to get the panels to render as divs when rendered by RenderControl?
Additional Information:
When I first looked into the problem I thought it might be a browsercaps issue, but when I looked at the web.config I saw that we already have browsercaps set as per this site: http://slingfive.com/pages/code/browserCaps/
I think I could get around this problem by using <div runat="server">
instead of panels, and in the end this might be the best solution, but at this point I am very curious if there is a way to get the panel to do what I want it to.