The difference between ASP. webpart and WSS. webpart baseclass

Source: Internet
Author: User

From: http://www.pointsharepoint.com/2008/08/whats-web-part-how-many-types-of-web.html

Web parts as defined by msdn are an integrated set of controls for creating web sites that enable end-users to modify the content, appearance, and behavior of web pages in a browser.
In Windows SharePoint Services 3.0 Web parts ultimately derive from the ASP. webpart (system. web. UI. webcontrols. webparts) base class; however, Windows SharePoint Services 3.0 also has a Web part base class (Microsoft. sharepoint. webpartpages. webpart) derived from the ASP. webpart class. if you are developing Web parts you can elect to derive from either the ASP. webpart or WSS. webpart; however you shoshould carefully consider your approach before developing custom web parts for use with Windows SharePoint Services 3.0. to help define the differences, we'll examine each class and their respective pros and cons.

Asp. NET Web parts
when deriving from the ASP. webpart your Web part derives directly from the ASP. webpart class which does not have a dependency on Windows SharePoint Services 3.0 code so it can be used in both ASP. net web sites or a Windows SharePoint Services 3.0 site collection/web. to ensure the Web Part customization is sustainable you shoshould consider using the ASP. webparts. ASP. webparts are exportable using. webpart extension, can be displayed in SPD using attribute markup and are persisted to the Windows SharePoint Services Store in Binary Web part format.

hybrid (Asp. NET 2.0 + Windows SharePoint Services Web parts)
Hybrid Web parts typically derive from the WSS. webpart base class; however, adhere to the design guidelines for ASP. webparts though the dependency on WSS. webpart implies its use strictly in a Windows SharePoint Services 3.0 site collection/web. hybrid Web parts shocould be considered only where features provided in the WSS. webparts class are required, for example, client-side connections. hybrid Web parts can also be used in version to version upgrades where the existing legacy Hybrid Web part cannot be retired in favor of a ASP. webpart. hybrid Web parts are exportable using. webpart extension, can be displayed in SPD using attribute markup and are persisted to the Windows SharePoint Services Store in Binary Web part format.

Windows SharePoint Services Web parts
WSS Web parts derive from the WSS. web part base class and meet the guidelines as provided by the Windows SharePoint Services 2.0 web part design guidelines. the WSS. webpart class is obsolete and is retained solely for backwards compatibility. WSS. webparts are exportable using. DWP extension, can be displayed in SPD using XML markup and are persisted to The WSS store in a compressed XML format.

The bottom line is, if you are considering developing custom web parts you shoshould consider deriving from the system. web. UI. webcontrols. webparts. webpart class and referencing the msdn guidance on developing ASP. NET Web parts to ensure the Web parts to maximize interoperability and sustainability.

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.