Labels

Tuesday, April 29, 2008

ASP.NET ListView Control - Orcas New Features

Hi,

This blog post summarizes the new features of ASP.Net 3.5 and VS 2008 IDE.

Below are the new features been introduced.

§ VS 2008 Multi-Targeting Support

§ VS 2008 JavaScript Intellisense

§ VS 2008 JavaScript Debugging

§ VS 2008 Code Editing Improvements

§ VS 2008 Nested Master Page Support - - Nothing to add. Read Post.

§ VS 2008 Web Designer and CSS Improvements

§ VS 2008 Vertical Split View Support - Nothing to add. Read Post.

§ VS 2008 ASP.NET AJAX Control Extenders

§ ASP.NET ListView Control (Part 1: Building a Product Listing Page with Pure CSS)

§ ASP.NET AJAX in .NET 3.5 and VS 2008

Before we go further let’s have a quick view.

Compatibility - From VS 2005 to VS 2008 and .NET Framework 2.0 to 3.5?

Though .NET Framework 3.5 is a super compatible upgrade from .NET 2.0, it does not require you to change any code in order to target the new framework version. Only non-breaking modifications to existing .NET assemblies have been made in the .NET 3.5 release, and wherever possible added new features in separate assemblies to minimize the chance of breaking changes.

Also no project model or build changes have been made with VS 2008. Both the "web site" and "web application project" models will be fully supported going forward.

ASP.NET ListView Control

Here I have been putting major points only. For other details, how it works please folow the below link.

Reference: http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx

· This is one of the new controls in ASP.NET 3.5.

· The ListView control supports the data editing, insertion, deleting, paging and sorting semantics of higher-level controls like the GridView.

· But - unlike the GridView - it provides you with complete control over the html markup generated.

· The <asp:listview> control is a Template-Driven Control and supports below templates:

o LayoutTemplate

o ItemTemplate

o AlternatingItemTemplate

o SelectedItemTemplate

o EditItemTemplate

o InsertItemTemplate

o EmptyItemTemplate

o EmptyDataTemplate

o ItemSeparatorTemplate

o GroupTemplate

o GroupSeparatorTemplate

o The LayoutTemplate and ItemTemplate - are the most common ones to use.

o <LayoutTemplate> template - Allows you to define the outer container/wrapper of your data UI.

o <ItemTemplate> template - Then allows you to define what each item in the list should look like.

o "ItemContainer" - Within the <LayoutTemplate> you then define an "ItemContainer" control that indicates where you want the <asp:ListView> control to dynamically add the <ItemTemplate> items into the output markup.

Note: <asp:placeholder> control is used instead of some other control as the itemContainer. Reason being- It will prevent any id values or extra markup being generated

Hope this helps.

Thanks & Regards,

Arun Manglick || Tech Lead

No comments:

Post a Comment