Chapter 3. Web Parts


Web sites today contain a wealth of information, so much that a poorly designed site can easily overwhelm users. To better help users cope, portal web sites today (such as MSN) often organize their data into discrete units that support a degree of personalization. Information is organized into standalone parts, and users can rearrange those parts to suit their individual working styles. Such personalization also lets users hide parts that contain information in which they have no interest. What's more, users can save their settings so that the site will remember their preferences the next time they visit the site. In ASP.NET 2.0, you can now build web portals that offer this kind of modularization of information and personalization using the new Web Parts Framework.


Note: Add Web Parts to your page so that positions of the controls can be rearranged by the user.

ASP.NET 2.0 provides a set of ready-made controls to help you develop Web Parts for your portals. You'll find the available controls on the WebParts tab of the Toolbox. Let's start with the basics. In this lab, you will learn how to create Web Parts for your ASP.NET web application.

Using Web Parts

In order to use the Web Parts on a portal page, a user must be authenticated.

By default, ASP.NET uses Windows authentication for your web applications, and hence all users need to be authorized to access your machine. However, this is not useful if you want your web application to be accessed by users over the Internet. For this purpose, you need to use Forms authentication. Refer to Chapter 5 for more information on how to enable Forms authentication.

An unauthenticated user who tries to personalize a page using Web Parts will cause a runtime error.




ASP. NET 2.0(c) A Developer's Notebook 2005
ASP. NET 2.0(c) A Developer's Notebook 2005
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 104

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net