problem with RenderOuterTable property for .net 4.0 controls
Posted
by Mario
on Stack Overflow
See other posts from Stack Overflow
or by Mario
Published on 2010-05-14T22:20:49Z
Indexed on
2010/05/14
22:24 UTC
Read the original article
Hit count: 376
According to the new 4.0 framework overview, one should be able to add the attrib RenderOuterTable="false" to a control that supports the attribute and see css friendly code be spit out - in other words no html tables.
To test this, I threw a login control into a basic fresh webpage with the following code:
<asp:Login ID="Login1" runat="server" RenderOuterTable="false"></asp:Login>
The result? Crappy html table output, which supposedly doesn't happen with this attrib set to false. Here is the output:
<table cellpadding="0">
<tr> <td align="center" colspan="2">Log In</td> </tr><tr> <td align="right"><label for="MainContent_Login1_UserName">User Name:</label></td><td><input name="ctl00$MainContent$Login1$UserName" type="text" id="MainContent_Login1_UserName" /><span id="MainContent_Login1_UserNameRequired" title="User Name is required." style="visibility:hidden;">*</span></td>...
Hopefully you get the point. Anyone know how to stop these controls from outputting tables? This is super annoying.
© Stack Overflow or respective owner