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 Page - 2
ASP.NET Using Web Parts and Controls in Web Pages
.
.
To create content for the main zone
1. In Design view, drag a Label control from the Standard tab of the Toolbox into the contents area of the zone whose ID property is set to MainZone.
2. Switch to Source view. Notice that a < zonetemplate > element was added to wrap the Label control in the MainZone.
3. Add an attribute named title to the < asp:label > element, and set its value to Content. Remove the Text="Label" attribute from the < asp:label > element. Between the opening and closing tags of the < asp:label > element, add some text such as Welcome to my Home Page within a pair of < h2 > element tags. Your code should look as follows.

Click here to veiw sample code
4. Save the file.
Now let us create a user control that can also be added to the page as a web parts control.
To create a user control
1. Add a new Web user control to your site. Let us add a calendar control to the “Main” section below the label control.
2. Switch to Design view. From the Standard tab of the Toolbox, drag a Tree view control to the SideBar Zone. Right click on the control and select Edit nodes.

The treeeview nodes editor window opens

3. Now create a Root node, child nodes and click ok.
4. If you wish to make your site colorful, you may set different background, foreground and title properties to your controls.

5. Save and close the file.
6. Click F5 to execute the application.
Note that in the title bar of each control there is a downward arrow that provides access to verbs menu. Click on the down arrow and see the actions that can be performed.
The code for Start.aspx should now look like this:
Click here to veiw sample code
The final page as displayed in the browser may look like this.

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







