Technical Training
ASP.NET 2.0ASP.NET Working with Web Parts Page - 2
ASP.NET Working with Web Parts
To create a new Web site using WebParts
1. In Visual Studio, create a new ASP.NET Web site.
2. If additional settings have to be configured on the website, select the Website menu and choose ASP.NET Configuration. This opens the ASP.NET Web Site Administration Tool, and provides access to various administration settings.

Let us create a simple page using web parts to better understand the concepts.
The Web.config File
When working with Web Parts it is important to have an authenticated user system. The Web.config file can be modified to ensure that the login of the user is required to access the home page of the portal. However, personalization features can work with anonymous users as well if the personalization features are activated.
Open the Web.config file and enter this code.
Click here to view sample code
Adding the WebPartManager Control
The WebPartManager Control has no visibility at runtime and hence can be placed anywhere on the page.

However, for sake of convinience it can be place in the head of the page between the head tags. This will ensure that it is available but does not disturb the layout of the page. In combination with master pages this becomes a great advantage, as it can be placed once and used on several pages. The following code is displayed when the WebPartManager Control is placed on a page. It must be noted that only one WebPartManager control can be placed per page.
< html xmlns="http://www.w3.org/1999/xhtml"" target="_blank" rel="nofollow"; >
< head runat="server" >
< title > Untitled Page < /title >
< asp:WebPartManager ID="WebPartManager1" runat="server" >
< /asp:WebPartManager >
< /head >
This section is a conceptual introduction on Web Parts and its uses. In the next section we shall see how these concepts can be applied to a Web page to create dynamic, user friendly pages.
ASP.NET 2.0
- Getting started with ASP.NET 2.0
- .NET Framework Fundamentals
- Microsoft.NET Framework Tools
- Application Development in .NET
- What's New in the .NET Framework 2.0 ?
- Introduction to Visual Studio.NET
- Installing Visual Studio.NET 2005
- Working with Visual Studio.NET Web Applications
- Whats New in ASP.NET 2.0
- Creating an ASP.NET Application
- ASP.NET Code Directory
- ASP.NET Page Object Model
- ASP.NET Server Controls
- ASP.NET Working With Master Pages
- ASP.NET Creating Content for Master Page
- ASP.NET Referencing Master Page Members
- ASP.NET Changing Master Pages Dynamically
- ASP.NET Creating Nested Master Pages
- ASP.NET Working with Web Parts
- ASP.NET Using Web Parts and Controls in Web Pages
- ASP.NET Web Pages and Layout
- ASP.NET - Adding Web Parts at Run Time
- ASP.NET Personalization: User Profiles and Themes
- ASP.NET Data Access features
- ASP.NET State Management
- ASP.NET Customizing the Session State Mechanism
- ASP.NET State Management And Caching
- ASP.NET Security
- Forms Authentication in ASP.NET
- ASP.NET Managing Membership and Roles
- ASP.NET Configuring Page-Level Caching
- ASP.NET Setting Application-Level Caching
- ASP.NET Data Source Object Model
- ASP.NET SqlDataSource Control
- ASP.NET Data Bound Controls
- ASP.NET GridView Control
- ASP.NET GridView Filtering
- ASP.NET Adding Sorting and Paging in GridView
- ASP.NET DataBound Controls - Details View
- ASP.NET Using a Grid to Display Detail Information
- ASP.NET Displaying Master-Detail Data on the Same Page
- Displaying Master-Detail Data on Separate Pages in ASP.NET
- ASP.NET Creating Web Wizards
- ASP.NET : Dynamic Image control
- ASP.NET Advanced Site Functionality







