WebPartManager::SelectedWebPart Property
Gets a reference to a WebPart or other server control that is currently selected for editing or for creating a connection with another control.
Assembly: System.Web (in System.Web.dll)
The SelectedWebPart property returns a reference to a WebPart or other server control that is currently selected for editing or for creating a connection with another control.
The WebPartManager control provides several useful methods and events for handling the process of selecting a control. The SelectedWebPartChanging event occurs just after a control is selected, but before any changes are made. To carry out some actions on the control after it is selected, override the OnSelectedWebPartChanging method. For example, you might want to change the appearance of a control that is selected but has not changed yet, to emphasize visually which control is selected.
The SelectedWebPartChanged event occurs just after the selected control has been changed. To carry out some actions on the control after it has changed, override the OnSelectedWebPartChanged method.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.