Share via


Microsoft.SharePoint.WebControls Namespace

The Microsoft.SharePoint.WebControls namespace contains ASP.NET server controls that are used on site and list pages in a SharePoint site. The major class, SPControl, provides methods for getting or setting the context of requests and serves as the base class from which other controls in this namespace derive.

All classes in this namespace require that a page directive like the following be included in the ASPX page containing the control:

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
   Assembly="Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral,
   PublicKeyToken=71e9bce111e9429c" %>

You can obtain the PublicKeyToken value for the current Windows SharePoint Services deployment from the default.aspx file in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\TEMPLATE\LCID(1033 in English)\STS folder, or from information provided for the Microsoft.SharePoint assembly at Local_Drive:\WINDOWS|WINNT\assembly in Windows Explorer.

Classes

The following table lists the classes of the Microsoft.SharePoint.WebControls namespace and shows a brief description of each.

Name Description
BpScript Inserts the server control that is used to open the Rich Text Editor in a Basic Page.
CssLink Inserts a LINK element into the resulting HTML page and applies an external style sheet.
CustomJSUrl Establishes a reference to a custom JavaScript file containing script to run on the page.
FormDigest Inserts a security validation within the form of an .aspx page.
ListItemProperty Returns a property of a list item.
ListProperty Returns a property of a list.
Navigation Inserts a navigation bar into a page on a SharePoint site.
OWSControl Ensures that all OWSForm server controls are contained within an <OWSForm> tag.
OWSDateField Represents a server control for a field that contains date and time values.
OWSForm Inserts a server control on the .aspx page and renders the JavaScript that is used in the form.
OWSNumberField Represents a server control for a field that contains numbers.
OWSSubmitButton Represents a server control for a submit button.
PortalConnection Inserts a connection to a portal site onto the page if a portal site exists.
ProjectProperty Returns a global property of the current Web site.
RelatedTasks Inserts the Actions section of the View bar into the .aspx page.
SPControl Provides methods for getting or setting the context of the request and serves as the base server control from which other controls in the Microsoft.SharePoint.WebControls namespace derive.
Theme Applies a theme to an .aspx page.
ViewSearchForm Inserts a view search form into the .aspx page.
ViewSelector Represents a server control that is used to select a view of a list.
WebPartPageContents Inserts a list of Web Parts contained within a Web Part Page into a page for managing the Web Parts.

Interfaces

The following table lists the interfaces of the Microsoft.SharePoint.WebControls namespace and shows a brief description of each.

Name Description
IDesignTimeHtmlProvider Provides design-time HTML for Web Form controls for use in Web development tools such as Microsoft FrontPage.