New features for web developers in ASP.NET 2.0


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

ASP.NET pioneered the built-in support for identifying users via Forms Authentication, which allows developers and administrators to control access to resources via a simple login page. The Framework provides the plumbing that automatically redirects users to the login page, creates and maintains the cookie that indicates successful authentication, while still allowing developers to create custom login routines that work with the underlying Forms Authentication architecture.

In ASP.NET 2.0, new controls make the process of building login pages even easier. These include the Login control to display the user name and password text boxes, the LoginName and LoginStatus controls that display the name and status of the current user, and the PasswordRecovery control that displays a Wizard where the user can provide the details required to have their password sent to them. You can also use templates with the new LoginView control to display content depending on the status of the current user.

Once you enable authentication on your site, you'll want to allow users to personalize the pages. Version 2.0 of ASP.NET provides a whole new infrastructure to support this through the Personalization features built into the core architecture. A database holds details of each user's preferences and personalization settings, and the controls in the page automatically reflect this. You can interact with the personalization system in your own code, and extend it to support the properties and features that you require.

One increasingly common use of personalization, especially for Intranet-based applications, is to support Web portals. This kind of site allows users to design their own page layouts, and change them to suit their needs. ASP.NET 2.0 includes the new Web Parts technology which allows you to create individual blocks of UI such as sections that displays a list of customers, the weather for a chosen region, or any other set of information that users may require. These sections of UI can communicate with each other: for example a Web Part that collects address details could query a remote Web Service and display the weather for that region.

Each user can add individual Web Parts to the page, hide or remove them, move them around, collapse them so that only the title bar is visible, and generally redesign the page as they wish. The personalization system keeps track of their layout (even if they have not logged into the site) and recreates it each time they open the page. Shown below is an example of the Web Parts technology in action:

Configuration, Management &

You might also like...


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.


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.

“Java is to JavaScript what Car is to Carpet.” - Chris Heilmann