FormView Control will not render any HTML of its own in Asp.net 4.0 if RenderTable property is set to false

Hi,

another of the new features of Asp.net 4.0 is the enhancement(in terms of rendering) made in the Formview control. By default the Formview control would render table, tr and td tags for display of content. This can be of much trouble to many of the designer because they have little control over the rendered HTML.

With Asp.net 4.0 you can disable the rendering of these HTML elements. (Mind you in Asp.Net 4.0 by default these HTML content are rendered.) To do this all you need to do is set the RenderTable property to False.

<asp:FormView ID="FormView1" runat="server" RenderTable="false">


This enhancement can make it easier to style the content of the control with CSS, because no unexpected tags are rendered by the control.

Vikram

Share this post   Email it

Feedback

Please post your comments:

Name:  
Email (optional): Your email address will not be posted.
URL (optional):
Comments: HTML will be ignored, URLs will be converted to hyperlinks  
Enter the text you see in the box:
 

Copyright © 2006 - 2010 Vikram Lakhotia