Tuesday, April 6, 2010

ASP.NET 4.0 –List View Control Enhancement

With asp.net 3.5 we are having a great control called list view its provide almost all the functionality like grid view and its rendering is also easy but in asp.net 3.5 you need to specify a layout template where in asp.net 4.0 layout template is not required. So no need to include one extra placeholder as layout template. Like in asp.net 3.5 you nee do render formview control like following.

<asp:ListView ID="myListView" runat="server">
<asp:PlaceHolder ID="LayoutPlaceHolder" runat="server"></asp:PlaceHolder>
<% Eval("myDataBaseColumn")%>
This can be replaced by following in asp.net 4.0. Now no need to for layout template like following.
<asp:ListView ID="myListView" runat="server">
<% Eval("myDataBaseColumn")%>
Hope this will help you..Happy coding..

Technorati Tags: ,
Shout it
kick it on DotNetKicks.com


Post a Comment

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

Search This Blog
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