New features for web developers in ASP.NET 2.0

Page 2 of 4
  1. Working with Data
  2. Consistent Page Design with Master Pages
  3. Personalisation
  4. New Controls

Consistent Page Design with Master Pages

This article was originally published on DNJ Online
DNJ Online
This article was originally published on DNJ Online
DNJ

Consistent Page Design

Most Web sites maintain a consistent ‘look and feel' across the pages using standard sections of HTML or dynamic content that is injected into every page - perhaps using #include directives, or through user controls. In version 2.0, Microsoft has added a new feature called Master Pages which allows you to create the outline for all your pages as a single template file, and then insert the content that differs on each page into this. You can include headers, images, menus, and other content in the master page, and edit the master page at any time to change the appearance of the whole site.

Shown below is what happens in Visual Studio 2005 when you are working on a section of content that uses the common UI from a master page: the master page content is visible, but greyed out because it cannot be edited in this view.

Furthermore, by taking advantage of the new navigation controls included in version 2.0, you can easily add dynamic menus and other features to the master page, or indeed any other ASP.NET page. There are Menu and TreeView controls to provide the visible menu in the page, and a SiteMapPath control that automatically provides a ‘breadcrumb trail' indication of the location of the current page within the site's page hierarchy. All these are powered by a special data source control named SiteMapDataSource which works with an XML file that defines the structure of your site. There's also the new ImageMap control which makes it easy to create clickable image maps, and handle user interaction as they click on the image map.

Other new features help to make page design easier, and support visitors with special needs. You can add custom styles to sets of UI controls as a single operation through the new Themes feature; make it easier for visually-impaired visitors to access the site by taking advantage of new accessibility support features of many of the ASP.NET server controls; and use the built-in Internationalization features to support multiple languages.

Security &

You might also like...

Comments

About the author

Alex Homer

Alex Homer United Kingdom

Alex spent most of his earlier working life as a technical salesman, and has had a love-hate relationship with computers that goes way back to the Sinclair Z80 and the Oric Atmos. In 1996 he ret...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An expert is a man who has made all the mistakes that can be made in a very narrow field” - Niels Bohr