This documentation is archived and is not being maintained.

Control.Site Property

Gets information about the container that hosts the current control when rendered on a design surface.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

'Declaration
Public Property Site As ISite
'Usage
Dim instance As Control
Dim value As ISite

value = instance.Site

instance.Site = value
/** @property */
public final ISite get_Site ()

/** @property */
public final void set_Site (ISite value)

public final function get Site () : ISite

public final function set Site (value : ISite)

Not applicable.

Property Value

An ISite that contains information about the container that the control is hosted in.

Exception typeCondition

InvalidOperationException

The control is a Substitution control.

A site binds a Component object to a Container object and enables communication between the two. It also provides a way for the container to manage its components.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: