Excludes specific verbs from being rendered, based on criteria provided by a developer.
Namespace:
System.Web.UI.WebControls.WebParts
Assembly:
System.Web (in System.Web.dll)
Visual Basic (Declaration)
Protected Overridable Function FilterWebPartVerbs ( _
verbs As WebPartVerbCollection, _
webPart As WebPart _
) As WebPartVerbCollection
Dim verbs As WebPartVerbCollection
Dim webPart As WebPart
Dim returnValue As WebPartVerbCollection
returnValue = Me.FilterWebPartVerbs(verbs, _
webPart)
protected virtual WebPartVerbCollection FilterWebPartVerbs(
WebPartVerbCollection verbs,
WebPart webPart
)
protected:
virtual WebPartVerbCollection^ FilterWebPartVerbs(
WebPartVerbCollection^ verbs,
WebPart^ webPart
)
protected function FilterWebPartVerbs(
verbs : WebPartVerbCollection,
webPart : WebPart
) : WebPartVerbCollection
| Exception | Condition |
|---|
| ArgumentNullException | The verbs collection is nullNothingnullptra null reference (Nothing in Visual Basic). - or -
webPart is nullNothingnullptra null reference (Nothing in Visual Basic). |
The FilterWebPartVerbs method provides a way to automatically filter certain verbs from the collection of verbs associated with a WebPart control, and prevent the filtered verbs from being rendered.
Notes to Inheritors: If you create a custom WebPartChrome class, you can optionally override the FilterWebPartVerbs method to filter out specific verbs from being rendered. The most common way to do this is to create a private method that checks the verbs in the Verbs collection of a WebPart control and determines whether each verb should be rendered, based on criteria that you choose. Note that the base method provides a lot of default filtering criteria that would be difficult to reproduce if you completely override the method; if you only have a few special cases, you might want to call the base method first, and then pass the resulting collection through your own additional method to apply your custom filtering criteria.
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.
.NET Framework
Supported in: 3.5, 3.0, 2.0
Reference
Other Resources