ASP.NET 4.0-FormView Control Enhancement –RenderOuterTable Property

Form view control is part of asp.net standard control suite since asp.net 2.0. We are using it when we need to display one record at a time. ASP.NET 4.0 has made form view control more enhanced.Now its has a property called RenderOuterTable which will decide the whether outer table was render in form view or not. So now the html generated by formview control is more css friendly and easy to manage. Like following we can define the property of from view control.

<asp:FormView ID="myFormView" runat="server" RenderOuterTable="true">
<ItemTemplate>
<div>
this is form view inner content
</div>
</ItemTemplate>
</asp:FormView>
If we made redneroutertable=”false” then it will render html like following.
<div>
this is form view inner content
</div>
So now form view control is more css friendly in asp.net and its easy to manage markup generated by asp.net.

Shout it
kick it on DotNetKicks.com

Comments

Popular posts from this blog

How to create Rest API(Web API) with ASP.NET Core 1.0

Creating PDF with ASP.Net MVC and RazorPDF

Solution: gulp is not recognized as internal or external command- Visual Studio