the loginview control allows you to determine which content is displayed to the user, without writing a single line of code. The content is displayed by examining the status and role of each user to determine an appropriate view. In traditional ASP applications, you had to write code to identify the current user, additional code to validate the user''s status, and then even more code to display content based on the user.
for a more detailed description of Web parts, please read Personalization with ASP.NET 2.0.
the ASP.NET 2.0 profile features allow you to define, save, and retrieve information associated with any user that visits your Web site. In a traditional ASP application, you would have to develop your own code to gather the data about the user, store it in session during the user''s session, and save it to some persistent data store when the user leaves the Web site. ASP.NET 2.0 automates all of this functionality with profiles. A profile is essentially a bucket of information associated with a user, and is directly accessible through the profile object that is accessible from every ASPX page.
within machine.config or Web.config, you can define a profile with <property> values that represent information such as name, billing address, and e-mail addresses for each user. You can even create groups of logical properties.
<profile> <group name="BillingAddress"> <add name="Street" type="System.String" /> <add name="City" defaultValue="Toronto" type="System.String" /> <add name="StateProv" type="System.String" /> <add name="ZipPostal" type="System.String" /> </group></profile>
once you have defined the profile, ASP.NET and the profile provider automatically take care of managing this information, including loading it on request and storing it when the user leaves your site.
once you have defined a profile, Visual Studio 2005 automatically exposes the profile properties through the profile object.
figure 15. Using profiles
visual Studio 2005 also provides full IntelliSense support for profiles. If you ever make a change to the profile definition, Visual Studio will automatically provide the correct IntelliSense as soon as you have saved your Web.config file.
one of the major differences between a Web application and a desktop application has been the ease with which a desktop application can contain multiple configurable components. For example, consider the Visual Studio IDE itself. A user can decide which windows to display and how they are arranged. Developing similar functionality in a Web site is a da