Skip to main content
WebPart Members


Provides the base class for creating Microsoft SharePoint Foundation Web Parts.

The WebPart type exposes the following members.

Constructors
 NameDescription
Protected methodWebPartInitializes the class for use by an inherited class instance. This constructor can only be called by an inherited class.
Top
Properties
 NameDescription
Public propertyAccessKey (Inherited from WebControl.)
Protected propertyAdapter (Inherited from Control.)
Public propertyAllowClose (Inherited from WebPart.)
Public propertyAllowConnectGets or sets a value that indicates whether the WebPart control allows other controls to form connections with it. (Overrides WebPart..::.AllowConnect.)
Public propertyAllowEditGets or sets a value indicating whether an end user can modify a WebPart control in personal view. (Overrides WebPart..::.AllowEdit.)
Public propertyAllowHideGets or sets a value indicating whether end users are allowed to hide a WebPart control. (Overrides WebPart..::.AllowHide.)
Public propertyAllowMinimizeGets or sets whether the Web Part can be minimized. (Overrides WebPart..::.AllowMinimize.)
Public propertyAllowRemoveObsolete. Gets or sets whether the Web Part can be removed from a Web Part Page by controlling whether the IsIncluded property can be set to false.
Public propertyAllowZoneChangeGets or sets whether the Web Part can be moved to a different zone by controlling whether the ZoneID property can be changed. (Overrides WebPart..::.AllowZoneChange.)
Public propertyAppRelativeTemplateSourceDirectory (Inherited from Control.)
Public propertyAttributes (Inherited from WebControl.)
Public propertyAuthorizationFilterGets or sets an arbitrary string to determine whether a Web Part is authorized to be added to a page. (Overrides WebPart..::.AuthorizationFilter.)
Public propertyBackColor (Inherited from WebControl.)
Public propertyBackImageUrl (Inherited from Panel.)
Public propertyBindingContainer (Inherited from Control.)
Public propertyBorderColor (Inherited from WebControl.)
Public propertyBorderStyle (Inherited from WebControl.)
Public propertyBorderWidth (Inherited from WebControl.)
Public propertyBrowserDesignModeObsolete. Gets whether a Web Part is in design mode (modifying its layout or properties) in the Web browser.
Protected propertyCacheTypeDetermines the type of caching being used by the Web server.
Public propertyCaptionObsolete. Gets or sets a string that is added following the title in the title bar of the Web Part. This property is intended for document names or other context-specific information.
Public propertyCatalogIconImageUrlGets or sets the URL to an image used to represent the Web Part in a catalog. (Overrides WebPart..::.CatalogIconImageUrl.)
Protected propertyChildControlsCreated (Inherited from Control.)
Public propertyChromeState (Inherited from WebPart.)
Public propertyChromeType (Inherited from WebPart.)
Protected propertyClassResourcePathGets the base path to Web Part class resources.
Public propertyClientID (Inherited from Control.)
Protected propertyClientIDSeparator (Inherited from Control.)
Public propertyClientNameGets the unique name of the Web Part used by the client-side Web Part Page Service Component (WPSC).
Public propertyConnectErrorMessage (Inherited from WebPart.)
Public propertyConnectionIDGets or sets the GUID that is used internally by the Web Part infrastructure as the unique identifier of a Web Part connection.
Public propertyConnectionsGets or sets the connection information that is stored with a connected Web Part.
Protected propertyContainerWidthObsolete. Gets the value set by the page author as a hint to the Web Part of how wide to expect the containing Web Part zone to be.
Protected propertyContext (Inherited from Control.)
Public propertyControls (Inherited from Part.)
Public propertyControlStyle (Inherited from WebControl.)
Public propertyControlStyleCreated (Inherited from WebControl.)
Public propertyCssClass (Inherited from WebControl.)
Public propertyCssStyleSheet
Public propertyDefaultButton (Inherited from Panel.)
Public propertyDescriptionGets or sets a text description that appears when the user rests the mouse pointer on the title of a Web Part in a Web Part Page or gallery. (Overrides WebPart..::.Description.)
Protected propertyDesignMode (Inherited from Control.)
Public propertyDetailLinkObsolete. Gets or sets a URL to an HTML document that contains supplemental information.
Public propertyDirObsolete. Gets or sets the direction of the reading order for a Web Part's text and frame. Setting this value overrides the value specified for the System.Web.UI.Page.Culture property.
Public propertyDirection (Inherited from WebPart.)
Public propertyDisplayTitle (Inherited from WebPart.)
Public propertyEffectiveFrameTypeObsolete. Gets the frame type that is used to render the Web Part frame at run time.
Public propertyEffectiveStorageGets whether the instance of the Web Part returned is stored as personal instance or shared instance.
Public propertyEffectiveTitleGets the title of specified the Web Part instance, including any disambiguation information added by the Web Part infrastructure.
Public propertyEnabled (Inherited from WebControl.)
Public propertyEnableTheming (Inherited from WebControl.)
Public propertyEnableViewState (Inherited from Control.)
Protected propertyEvents (Inherited from Control.)
Public propertyExportControlledPropertiesObsolete. Gets or sets a value indicating whether a Web Part’s properties that are flagged as controlled properties by the Web Part developer can have their values exported in personal view.
Public propertyExportMode (Inherited from WebPart.)
Public propertyFont (Inherited from WebControl.)
Public propertyForeColor (Inherited from WebControl.)
Public propertyFrameStateObsolete. Gets or sets the initial state of the Web Part frame, which can be normal (expanded) or minimized.
Public propertyFrameTypeObsolete. Gets or sets the style of the Web Part frame.
Public propertyGroupingText (Inherited from Panel.)
Public propertyHasAttributes (Inherited from WebControl.)
Protected propertyHasChildViewState (Inherited from Control.)
Public propertyHasSharedData (Inherited from WebPart.)
Public propertyHasUserData (Inherited from WebPart.)
Public propertyHeightGets or sets the fixed height for a Web Part on a Web Part Page.
Public propertyHelpLinkObsolete. Gets or sets a URL or file system path to a help file in HTML format.
Public propertyHelpModeGets or sets the type of user interface used to display Help content for a Web Part. (Overrides WebPart..::.HelpMode.)
Public propertyHelpUrlGets or sets a Help link. (Overrides WebPart..::.HelpUrl.)
Public propertyHiddenGets or sets a value indicating whether the Web Part is displayed on a Web page. (Overrides WebPart..::.Hidden.)
Public propertyHorizontalAlign (Inherited from Panel.)
Public propertyIDGets or sets an identifier for the Web Part. (Overrides Control..::.ID.)
Protected propertyIdSeparator (Inherited from Control.)
Public propertyImportErrorMessage (Overrides WebPart..::.ImportErrorMessage.)
Protected propertyIsChildControlStateCleared (Inherited from Control.)
Public propertyIsClosed (Inherited from WebPart.)
Protected propertyIsEnabled (Inherited from WebControl.)
Public propertyIsIncludedObsolete. Gets or sets a value indicating whether a Web Part that is added by another user or the administrator in the shared view of a Web Part page should be included in a personal view of the page.
Public propertyIsIncludedFilterObsolete. Gets or sets the parameters used by the IRuntimeFilter interface to determine if the Web Part will be included on the Web Part Page.
Public propertyIsShared (Inherited from WebPart.)
Public propertyIsStandalone (Inherited from WebPart.)
Public propertyIsStatic (Inherited from WebPart.)
Protected propertyIsTrackingViewState (Inherited from Control.)
Protected propertyIsViewStateEnabled (Inherited from Control.)
Public propertyIsVisibleObsolete. Gets or sets whether the Web Part is visible.
Protected propertyLoadViewStateByID (Inherited from Control.)
Public propertyMissingAssemblyObsolete. Gets or sets the message shown to the user when importing a Web Part if the assembly for the Web Part is not installed on the target server.
Public propertyNamingContainer (Inherited from Control.)
Protected propertyOverflowAutoGets a value indicating whether you can override the default setting for the cascading style sheet (CSS) overflow attribute when rendering the Web Part.
Public propertyPage (Inherited from Control.)
Public propertyParent (Inherited from Control.)
Public propertyPartImageLargeObsolete. Gets or sets the URL of an image file containing a 16 x 16 pixel image, typically used to depict icons.
Public propertyPartImageSmallObsolete. Gets or sets the URL of an image file that appears in the title of a Web Part.
Public propertyPartOrderObsolete. Gets or sets the order in which the Web Part appears within a Web Part zone.
Public propertyPermissionsObsolete. Gets the properties of a Web Part that can be modified currently.
Public propertyQualifierGets a unique identifier for a Web Part.
Protected propertySavePropertiesGets or sets a value that indicates whether the properties of a Web Part have changed and should be persisted at the end of page rendering.
Public propertyScrollBars (Inherited from Panel.)
Protected propertySerializeAllGets whether a retrieved property value should be serialized for use in the client-side WPSC property collection.
Public propertySerializedAttachedPropertiesSharedSupports the SharePoint Foundation Web Part connection infrastructure. Not intended to be used directly from your code.
Public propertySerializedAttachedPropertiesUserSupports the SharePoint Foundation Web Part connection infrastructure. Not intended to be used directly from your code.
Protected propertyServerRelativeClassResourcePathGets the server-relative path to Web Part class resources.
Protected propertyShouldValidateGets a value indicating whether the Web Part infrastructure should perform data validation of Web Part properties before setting them.
Public propertySite (Inherited from Control.)
Public propertySkinID (Inherited from WebControl.)
Public propertyStorageKeyGets the unique identifier that is set by the Web Part infrastructure when a Web Part is added to a Web Part Zone.
Public propertyStyle (Inherited from WebControl.)
Public propertySubtitleReturns the value of the Caption property. (Overrides WebPart..::.Subtitle.)
Public propertySuppressWebPartChromeGets or sets whether chrome is displayed for a static Web Part.
Public propertyTabIndex (Inherited from WebControl.)
Protected propertyTagKey (Inherited from WebControl.)
Protected propertyTagName (Inherited from WebControl.)
Public propertyTemplateControl (Inherited from Control.)
Public propertyTemplateSourceDirectory (Inherited from Control.)
Public propertyTitleGets or sets the title that appears in the title bar of a Web Part. (Overrides WebPart..::.Title.)
Public propertyTitleIconImageUrlGets or sets the URL to an image used to represent the Web Part in its own title bar. (Overrides WebPart..::.TitleIconImageUrl.)
Public propertyTitleUrlGet or sets a title link. (Overrides WebPart..::.TitleUrl.)
Public propertyToolTip (Inherited from WebControl.)
Public propertyUniqueID (Inherited from Control.)
Public propertyUnknownXmlElementsGets an UnknownXmlElementCollection object that contains XML elements from an imported SharePoint Web Part that were not mapped to a property on the Web Part.
Public propertyUseDefaultStylesGets or sets whether the default font size and style are applied to the Web Part.
Public propertyVerbs (Inherited from WebPart.)
Protected propertyViewState (Inherited from Control.)
Protected propertyViewStateIgnoresCase (Inherited from Control.)
Public propertyVisible (Inherited from Control.)
Public propertyWebBrowsableObject (Inherited from WebPart.)
Protected propertyWebPartManager (Inherited from WebPart.)
Protected propertyWebPartMenuGets or sets the Web Part menu source that is rendered in the frame of the Web Part.
Public propertyWidthGets or sets the fixed width for a Web Part.
Protected propertyWorkItemTimeoutObsolete.
Public propertyWrap (Inherited from Panel.)
Public propertyZone (Inherited from WebPart.)
Public propertyZoneIDGets or sets the Web Part zone in which to render the Web Part.
Public propertyZoneIndex (Inherited from WebPart.)
Top
Methods
 NameDescription
Protected methodAddAttributesToRender (Inherited from Panel.)
Protected methodAddedControl (Inherited from Control.)
Protected methodAddParsedSubObjectUsed to process Web Part XML for static Web Parts. (Overrides Control..::.AddParsedSubObject(Object).)
Public methodAfterDeserializeCalled after a SharePoint Web Part's properties are deserialized from the SharePoint database or from a Web Part description file (.dwp). Suggested place for SharePoint Web Part upgrade code.
Public methodApplyStyle (Inherited from WebControl.)
Public methodApplyStyleSheetSkin (Inherited from Control.)
Protected methodBuildProfileTree (Inherited from Control.)
Public methodCanRunAtObsolete. Returns a value that indicates where the implementation of a connection interface can run.
Protected methodClearChildControlState (Inherited from Control.)
Protected methodClearChildState (Inherited from Control.)
Protected methodClearChildViewState (Inherited from Control.)
Public methodCopyBaseAttributes (Inherited from WebControl.)
Protected methodCreateChildControls (Inherited from Control.)
Protected methodCreateControlCollection (Inherited from Control.)
Protected methodCreateControlStyle (Inherited from Panel.)
Public methodCreateEditorParts (Inherited from WebPart.)
Public methodCreateWebPartMenuCalled after the Microsoft ASP.NET Load event and used to modify or override the default menu.
Public methodDataBind()()() (Inherited from Part.)
Protected methodDataBind(Boolean) (Inherited from Control.)
Protected methodDataBindChildren (Inherited from Control.)
Public methodDisposeReleases all resources used by the Web Part. (Overrides Control..::.Dispose()()().)
Protected methodEnsureChildControls (Inherited from Control.)
Protected methodEnsureID (Inherited from Control.)
Public methodEnsureInterfacesObsolete. Provides notification for a connectable Web Part that it should ensure all its interfaces are registered using the RegisterInterface method.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFindControl(String) (Inherited from Control.)
Protected methodFindControl(String, Int32) (Inherited from Control.)
Public methodFocus (Inherited from Control.)
Protected methodGetCustomBuilderProvides the ability to associate a dynamic builder with a custom property of a Web Part.
Public methodGetDataObsolete. Called when the System.Web.UI.Control.PreRender event occurs to allow a Web Part to retrieve data.
Protected methodGetDesignModeState (Inherited from Control.)
Public methodGetDesignTimeFooterReturns the static HTML for the footer portion of a Web Part frame to a custom designer created by deriving from System.Web.UI.ControlDesigner.
Public methodGetDesignTimeHeaderReturns static HTML for the header portion of a Web Part frame to a custom designer created by deriving from System.Web.UI.ControlDesigner.
Public methodGetHashCode (Inherited from Object.)
Public methodGetInitEventArgsObsolete. Returns the InitEventArgs object for the name of the interface that is passed in.
Public methodGetRequiresDataObsolete. The virtual method that is called by the Web Part infrastructure when the System.Web.UI.Control.PreRender event occurs to indicate that a Web Part requires data.
Public methodGetToolPartsDetermines which tool parts are displayed in the tool pane of the Web-based Web Part design user interface, and the order in which they are displayed.
Public methodGetType (Inherited from Object.)
Public methodHasControls (Inherited from Control.)
Protected methodHasEvents (Inherited from Control.)
Protected methodIsLiteralContent (Inherited from Control.)
Protected methodLoadControlState (Inherited from Control.)
Public methodLoadResourceReturns a string that describes the localized name, category, and description of the specified resource.
Protected methodLoadViewStateRestores view-state information from a previous request that was saved with the SaveViewState()()() method. (Overrides WebControl..::.LoadViewState(Object).)
Protected methodMapPathSecure (Inherited from Control.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMergeStyle (Inherited from WebControl.)
Protected methodNotifyWorkItemCompleteObsolete. Indicates that work being performed on an external asynchronous thread that has been registered using the RegisterWorkItem method has completed.
Protected methodOnBubbleEvent (Inherited from Control.)
Protected methodOnClosing (Inherited from WebPart.)
Protected methodOnConnectModeChanged (Inherited from WebPart.)
Protected methodOnDataBindingThe event handler for the System.Web.UI.Control.DataBinding event that occurs when a Web Part is binding to a data source. (Overrides Control..::.OnDataBinding(EventArgs).)
Protected methodOnDeleting (Inherited from WebPart.)
Protected methodOnEditModeChanged (Inherited from WebPart.)
Protected methodOnInitThe event handler for the System.Web.UI.Control.Init event that occurs as the Web Part is being instantiated. (Overrides Control..::.OnInit(EventArgs).)
Protected methodOnLoad (Inherited from Control.)
Protected methodOnPreRenderThe event handler for the System.Web.UI.Control.PreRender event that occurs immediately before the Web Part is rendered to its containing Web Part Page. (Overrides Control..::.OnPreRender(EventArgs).)
Protected methodOnUnloadThe event handler for the System.Web.UI.Control.Unload event, which occurs when the Web Part is being unloaded from memory. (Overrides Control..::.OnUnload(EventArgs).)
Protected methodOpenFile (Inherited from Control.)
Public methodPartCacheInvalidate()()()Marks all the contents of the Web Part cache as outdated.
Protected methodPartCacheInvalidate(Storage)Marks all contents of the specified storage type in the Web Part cache as outdated.
Protected methodPartCacheInvalidate(Storage, String)Marks the specified cache entries of the specified storage type in the Web Part cache as outdated.
Protected methodPartCacheReadReads and returns a value from the specified location in the specified type of storage in the Web Part cache.
Protected methodPartCacheWriteStores the specified value of the specified type of storage in the Web Part cache.
Public methodPartCommunicationConnectObsolete. Used to notify a Web Part that it has been connected to another Web Part.
Public methodPartCommunicationInitObsolete. Provides a connectable Web Part with a method for firing any of its initialization events, such as the CellProviderInit or CellConsumerInit event.
Public methodPartCommunicationMainObsolete. Provides a connectable Web Part with a method to fire events for any of the main events of a connectable Web Part, such as the CellReady event.
Protected methodRaiseBubbleEvent (Inherited from Control.)
Protected methodRegisterInterface(String, String, Int32, ConnectionRunAt, Object, String, String, String)Obsolete. Registers an interface from the Microsoft.SharePoint.WebPartPages.Communication namespace for a connectable Web Part.
Protected methodRegisterInterface(String, String, Int32, ConnectionRunAt, Object, String, String, String, Boolean)Obsolete. Registers an interface from the Microsoft.SharePoint.WebPartPages.Communication namespace for a connectable Web Part with the option of specifying how cross-page connections are handled.
Protected methodRegisterWorkItemObsolete. Keeps track of work being done by an external thread, such as a Web Part that handles its own thread pool.
Protected methodRegisterWorkItemCallbackObsolete. Queues a Web Part work item to the thread pool, invokes the specified delegate, and specifies an object to be passed to the delegate when serviced from the thread pool.
Protected methodRemovedControl (Inherited from Control.)
Protected methodRenderRenders the control to the specified HTML writer. This method is inherited from the System.Web.UI.Control class. (Overrides WebControl..::.Render(HtmlTextWriter).)
Public methodRenderBeginTag (Inherited from Panel.)
Protected methodRenderChildren (Inherited from Control.)
Protected methodRenderContents (Inherited from WebControl.)
Public methodRenderControl(HtmlTextWriter) (Inherited from Control.)
Protected methodRenderControl(HtmlTextWriter, ControlAdapter) (Inherited from Control.)
Public methodRenderEndTag (Inherited from Panel.)
Protected methodRenderWebPartRenders the HTML for the body of a Web Part to the client.
Protected methodRenderWorkItemTimeoutObsolete. Renders HTML in a Web Part when a work item has timed out.
Protected methodReplaceTokensPerforms token replacement for a string, using the same algorithm used for URL-valued properties.
Protected methodRequiresWebPartClientScriptIndicates whether this Web Part has client-side script to register with the Web Part Page Services Component (WPSC) framework.
Protected methodResolveAdapter (Inherited from Control.)
Public methodResolveClientUrl (Inherited from Control.)
Public methodResolveUrl (Inherited from Control.)
Protected methodSaveControlState (Inherited from Control.)
Protected methodSaveViewState (Inherited from WebControl.)
Protected methodSetDesignModeState (Inherited from Control.)
Protected methodSetPersonalizationDirty (Inherited from WebPart.)
Public methodSetRenderMethodDelegate (Inherited from Control.)
Protected methodSetWebPartPageComponent
Public methodShouldSerializeAllowConnectReturns whether the AllowConnect property has changed from its default value.
Public methodShouldSerializeAllowEditReturns whether the AllowEdit property has changed from its default value.
Public methodShouldSerializeAllowHideReturns whether the AllowHide property has changed from its default value.
Public methodShouldSerializeAllowMinimizeReturns whether the AllowMinimize property has changed from its default value.
Public methodShouldSerializeAllowRemoveReturns whether the AllowRemove property has changed from its default value.
Public methodShouldSerializeAllowZoneChangeReturns whether the AllowZoneChange property has changed from its default value.
Public methodShouldSerializeConnectionIDReturns whether the ConnectionID property has changed from its default value.
Public methodShouldSerializeConnectionsReturns whether the Connections property has changed from its default value.
Public methodShouldSerializeDescriptionReturns whether the Description property has changed from its default value.
Public methodShouldSerializeDetailLinkReturns whether the DetailLink property has changed from its default value.
Public methodShouldSerializeDirReturns whether the Dir property has changed from its default value.
Public methodShouldSerializeExportControlledPropertiesReturns whether the ExportControlledProperties property has changed from its default value.
Public methodShouldSerializeFrameStateReturns whether the FrameState property has changed from its default value.
Public methodShouldSerializeFrameTypeReturns whether the FrameType property has changed from its default value.
Public methodShouldSerializeHeightReturns whether the Height property has changed from its default value.
Public methodShouldSerializeHelpLinkReturns whether the HelpLink property has changed from its default value.
Public methodShouldSerializeHelpModeReturns whether the HelpMode property has changed from its default value.
Public methodShouldSerializeIDReturns whether the ID property has changed from its default value.
Public methodShouldSerializeIsIncludedReturns whether the IsIncluded property has changed from its default value.
Public methodShouldSerializeIsIncludedFilterReturns whether the IsIncludedFilter property has changed from its default value.
Public methodShouldSerializeIsVisibleReturns whether the IsVisible property has changed from its default value.
Public methodShouldSerializeMissingAssemblyReturns whether the MissingAssembly property has changed from its default value.
Public methodShouldSerializePartImageLargeReturns whether the PartImageLarge property has changed from its default value.
Public methodShouldSerializePartImageSmallReturns whether the PartImageSmall property has changed from its default value.
Public methodShouldSerializePartOrderReturns whether the PartOrder property has changed from its default value.
Public methodShouldSerializeTitleReturns whether the Title property has changed from its default value.
Public methodShouldSerializeWidthReturns whether the Width property has changed from its default value.
Public methodShouldSerializeZoneIDReturns whether the ZoneID property has changed from its default value.
Public methodToString (Inherited from Object.)
Protected methodTrackViewState (Inherited from WebPart.)
Top
Events
 NameDescription
Public eventDataBinding (Inherited from Control.)
Public eventDisposed (Inherited from Control.)
Public eventInit (Inherited from Control.)
Public eventLoad (Inherited from Control.)
Public eventPreRender (Inherited from Control.)
Public eventUnload (Inherited from Control.)
Top
Fields
 NameDescription
Public fieldStatic memberLimitOneConnectionSpecifies that a connectable Web Part can accept no more than one connection to another Web Part.
Public fieldStatic memberUnlimitedConnectionsSpecifies that a connectable Web Part can accept an unlimited number of connections to another Web Part.
Top