Use webpart series controls in ASP. NET 2.0 (1)

Source: Internet
Author: User
In the current website design, more emphasis is placed on the user's personalized settings, allowing users to freely set pages that suit their preferences and become the top challenge for website developers, but now it seems that Microsoft has helped us solve this problem. Added a series of webpart controls in Asp.net 2.0, allowing users to easily adjust the layout of various areas of the webpage. In some Web Applications Program If you want to customize the page layout, such as a news publishing system, and want to change the positions in the left, middle, and right columns, you can use the webpart control.

Next, let's take a look at some basic usage of the webpart series controls in ASP. NET 2.0.

First, you can find the webpart series controls shown in the toolbox in vs.net 2005. There are many controls that are limited by space. This article introduces some important controls:



In the webpart control series, the webpartmanager control is used to manage all webpart controls in a unified manner. The webpartzone control provides the division of different regions. In these regions, you can place various controls in it. When running, what users can move is the region where these webpartzone controls are located.

To enhance our understanding, let's give a simple example.

1. Use vs.net 2005 beta 2 (or RC1) to create a web site,

2. Drag a webpartmanager control to the form, create a table with three columns and one row, and drag a webpartzone control to each cell, for example:



3. Drag a calendar control to webpartzone1 and select a proper style for the calendar control.

4. Switch to the Code view State and change the title attribute of the calendar control to "today's date. Note that the calendar control does not have the title attribute, but when a control is added to the webpartzone region, the control is automatically packaged as a genericwebpart control, these types of controls have the title attribute.

5. At this time, we can press F5 to run the program, as shown in. We can see that there is a button to minimize, close, and recover in the upper right corner of the area.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.