Tuesday, April 6, 2010

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
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

About Me
My Photo

Full Stack Developer,Blogger,Microsoft Mvp, Mentor, Life long learner, 10+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC,Web Forms,C#,AngularJs,Golang
Mvp profile
Subscribe to my blog

Enter your email address:

Follow us on facebook
Blog Archive
Total Pageviews