WebPartChrome.FilterWebPartVerbs(WebPartVerbCollection, WebPart) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Excludes specific verbs from being rendered, based on criteria provided by a developer.
protected:
virtual System::Web::UI::WebControls::WebParts::WebPartVerbCollection ^ FilterWebPartVerbs(System::Web::UI::WebControls::WebParts::WebPartVerbCollection ^ verbs, System::Web::UI::WebControls::WebParts::WebPart ^ webPart);
protected virtual System.Web.UI.WebControls.WebParts.WebPartVerbCollection FilterWebPartVerbs (System.Web.UI.WebControls.WebParts.WebPartVerbCollection verbs, System.Web.UI.WebControls.WebParts.WebPart webPart);
abstract member FilterWebPartVerbs : System.Web.UI.WebControls.WebParts.WebPartVerbCollection * System.Web.UI.WebControls.WebParts.WebPart -> System.Web.UI.WebControls.WebParts.WebPartVerbCollection
override this.FilterWebPartVerbs : System.Web.UI.WebControls.WebParts.WebPartVerbCollection * System.Web.UI.WebControls.WebParts.WebPart -> System.Web.UI.WebControls.WebParts.WebPartVerbCollection
Protected Overridable Function FilterWebPartVerbs (verbs As WebPartVerbCollection, webPart As WebPart) As WebPartVerbCollection
Parameters
- verbs
- WebPartVerbCollection
The collection of all verbs associated with the control referenced in the webPart
parameter.
- webPart
- WebPart
The control currently being rendered.
Returns
A WebPartVerbCollection containing all verbs associated with the webPart
.
Exceptions
Remarks
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(WebPartVerbCollection, WebPart) 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.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기