ASP. NET Web Components

Source: Internet
Author: User

ASP. NET web components are a set of integrated controls used to create websites so that end users can directly modify the content, appearance, and behavior of webpages from a browser. These modifications can be applied to all users on the website or individual users. When you modify pages and controls, you can save these settings so that the user's personal preferences can be preserved across future browser sessions. This feature is called personalized settings. These web part functions mean that developers can enable end users to dynamicallyProgramPersonalized settings without the intervention of developers or administrators.

By using the Web Part Control Set, developers can enable end users to perform the following operations:

    • Customize the page content. Users can add new Web Part controls on pages like normal windows, or remove, hide, or minimize these controls.

    • Customize the page layout. You can drag a web widget to different areas of the page or change its appearance, properties, and behavior.

    • Export and import controls. You can import or export Web part control settings for other pages or sites to retain the properties, appearances, and even data of these controls. This reduces the data input and Configuration Requirements for end users.

    • Create a connection. You can establish a connection between controls. For example, the chart control can be a data display image in the stock ticker control. You can not only customize the connection, but also customize how the chart control displays the appearance and details of the data.

    • Manage and personalize site-level settings. Authorized users can configure site-level settings, determine who can access the site or page, and set role-based access to controls. For example, a user in the administrator role can share a Web Part Control with all users and prohibit non-administrator users from personalized settings of the control.

Basic elements of Web Components

The Web Part Control set consists of three main constructor blocks: personalized settings, user interface (UI) structure components, and actual Web Part UI controls. Many development work will focus on Web Part controls, which are only ASP. Net controls that can use the Web Part Control Set function.

The following screen snapshot is used as an example to show how to use the Web parts control to generate a page that can be customized.

This page contains several basic elements of a Web Part application:

    • Area usage in the page layout. There are two columns that can contain controls: one includes the weather and stock quotes controls, and the other includes the Hotmail and news controls. These two columns are called areas in Web Part terms, that is, areas on the page that contain Web Part controls. The area is used to layout the Web widget on the page and provide a public UI for the widget. There can be one or more areas on the page. Each area can contain one or more Web Part controls, and each area can have a vertical or horizontal page layout.

    • Area. Each control has links, buttons, or UI predicates that can be clicked on the control (operations that can be performed by the user ). In the above screen snapshot, note that each control has a button that displays the drop-down menu in its title bar. The menu of each control contains options used to change the specific details of the control, and other options used to perform common operations such as moving or deleting the control and getting help. Some controls (such as the weather control) allow users to customize them to display only user-related information.

    • Link to enable a large number of personalized settings. These links allow you to change the page content, color, and layout. For example, if you click the "add column" link, the Web parts application allows you to add other columns to the page. Alternatively, you can click the "add content" link to display a control directory. You can selectively add controls to the page. These controls may contain the stock charting control. You can add the control to a certain area on the page, and then connect the control to the existing stock quotes control to draw a chart for the stock data it contains.

Developer solutions using Web controls

One of the following methods is usually used to create a Web Part Control page and a single web part control, or create a complete, personalized Web application (such as a portal ).

Page Development

Page developers can use visual design tools (such as Microsoft Visual Studio 2005) to create pages that use Web components. One advantage of using tools such as Visual Studio is that in the visual designer, the Web Part Control Set provides the drag-and-drop function to create and configure Web Part controls. For example, you can use the designer to drag a Web Part area or a Web Part editor control to the design surface, use the user interface provided by the Web Part Control set to configure the control in the correct position in the designer. This can accelerate the development of Web component applications and reduce the numberCodeQuantity.

Control Development

Any existing ASP. NET controls can be used as Web component controls, including standard Web server controls, custom server controls, and user controls. To control the environment to the maximum extent through programming, you can also create custom Web Part controls derived from the webpart class. When developing a single web part control, a user control is usually created and used as a Web Part Control, or a custom Web Part Control is developed.

As an example of developing a custom web part control, you can create a control to provide other ASP. any function provided by the. NET Server Control, which may be very useful for packaging Web Part controls that can be customized. Such controls include: calendar, list, financial information, news, calculators, multi-format text controls for updating content, editable grids for connecting to databases, dynamically updating displayed charts or weather and travel information. If a visual designer is provided for the control, developers who use any page of Visual Studio only need to drag the control to the Web parts Area and configure the control during design, no additional code is required.

Web Application Development

Developing fully integrated and customizable Web applications (such as portals) involves the most comprehensive use of Web components. You can develop a website that allows users to customize a large number of user interfaces and content. Its function is similar to MSN. Alternatively, you can develop a packaging application that can be provided and used by a company that provides Portal loading services or a paid ISP.

In the web application solution, end users can be provided with a complete solution to manage and customize applications. This may include: A set of web part controls that provide the functions required by the site, a set of consistent themes and styles that enable end users to personalize the user interface, and a Web Part Control directory (from which users can select controls to be displayed on the page) identity Authentication Service and Role-Based Management (for example, allows administrator users to customize Web Part controls and site settings for all users ).

For each part of the application, you can expand the Web Part Control as needed to provide better control of the environment. For example, in addition to creating custom web parts controls for the main user interface of the page, you may also need to develop a custom Web Part directory consistent with the application's appearance, this allows you to add controls to the page more flexibly. You can also extend the region control to provide other user interface options for its Web Part Control. In addition, you can write custom personalized settings to provide more flexibility and control for the storage and management of personalized settings data.

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.