WebPartChrome::FilterWebPartVerbs Method
Excludes specific verbs from being rendered, based on criteria provided by a developer.
Assembly: System.Web (in System.Web.dll)
protected: virtual WebPartVerbCollection^ FilterWebPartVerbs( WebPartVerbCollection^ verbs, WebPart^ webPart )
Parameters
- verbs
- Type: System.Web.UI.WebControls.WebParts::WebPartVerbCollection
The collection of all verbs associated with the control referenced in the webPart parameter.
- webPart
- Type: System.Web.UI.WebControls.WebParts::WebPart
The control currently being rendered.
Return Value
Type: System.Web.UI.WebControls.WebParts::WebPartVerbCollectionA WebPartVerbCollection containing all verbs associated with the webPart.
| Exception | Condition |
|---|---|
| ArgumentNullException | The verbs collection is nullptr. - or - webPart is nullptr. |
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 InheritorsIf 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 SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.