TemplateBasedControl.Web Property

Gets the site of the control's rendering context; which is the value of the SPContext.Web property of the object held by the TemplateBasedControlRenderContext() property.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Overridable ReadOnly Property Web As SPWeb
    Get
'Usage
Dim instance As TemplateBasedControl
Dim value As SPWeb

value = instance.Web
public virtual SPWeb Web { get; }

Property Value

Type: Microsoft.SharePoint.SPWeb
A SPWeb object that represents the site (not site collection) of the control's rendering context.

Remarks

Use the Web property to make your code more readable by shortening references to the site.

See Also

Reference

TemplateBasedControl Class

TemplateBasedControl Members

Microsoft.SharePoint.WebControls Namespace