Technical Training
ASP.NET 2.0Table of Contents
ASP.NET Using Web Parts and Controls in Web Pages
ASP.NET Using Web Parts and Controls in Web Pages - Page 2ASP.NET Using Web Parts and Controls in Web Pages
ASP.NET : Using Web Parts and Controls in Web Pages
In this tutorial you will learn how To create a page for containing Web Parts controls, To create content for the main zone and To create a user control.
In the preceding section we examined the concepts of Web Parts and the features of the controls that have been provided by ASP.NET 2.0 for rapidly creating web portals that are elegant and well laid out. We also theoretically appreciated the immense potential of allowing users to customize the content they wish to see. In this section we shall create a simple web page and use web parts and controls to demonstrate how all this can be done. click
To create a page for containing Web Parts controls
1. Close the default page and add a new page to the site named Start.aspx.
2. Switch to Design view.
3. Add a heading to the page with the text Web Parts Demonstration Page.
4. From the WebParts tab of the Toolbox, drag a WebPartManager control onto the page.
5. The WebPartManager control does not render any output, so it appears as a grey box on the designer surface.

6. Position the insertion point after the WebPartManager control, and press ENTER to add a line break.
7. In the Layout menu, click Insert Table, and create a new table that has one row and three columns. Click the Cell Properties button, select Top from the Vertical align drop-down list, click OK, and click OK again to create the table.



8. Drag a WebPartZone control into the left table column. Right-click the WebPartZone control, choose Properties, and set the following properties:

9. ID: SidebarZone
10. HeaderText: Sidebar
11. Drag a second WebPartZone control into the middle table column and set the following properties:
12. ID: MainZone
13. HeaderText: Main
14. Save the file.
Now the Web page has two distinct zones that can be controlled separately. The next step in the process is to create content. We shall create static content in this exercise to appreciate the concept.
The layout of the Web Parts zone is defined by the element ZoneTemplate as stated earlier in this tutorial. Inside this template any ASP.NET control can be added. For instance using a Label control static text can be added. When a regular server control such as a WebPartZone is added, ASP.NET views the control as a Web part control at runtime.
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







