PageParserFilter.AllowControl(Type, ControlBuilder) Método
Definição
Obtém um valor que indica se o tipo de controle especificado é permitido para esta página.Gets a value indicating whether the specified control type is allowed for this page.
public:
virtual bool AllowControl(Type ^ controlType, System::Web::UI::ControlBuilder ^ builder);
public virtual bool AllowControl (Type controlType, System.Web.UI.ControlBuilder builder);
abstract member AllowControl : Type * System.Web.UI.ControlBuilder -> bool
override this.AllowControl : Type * System.Web.UI.ControlBuilder -> bool
Public Overridable Function AllowControl (controlType As Type, builder As ControlBuilder) As Boolean
Parâmetros
- controlType
- Type
Um Type que representa o tipo de controle a adicionar.A Type that represents the type of control to add.
- builder
- ControlBuilder
Um ControlBuilder usado para criar o tipo de controle especificado.A ControlBuilder used to build the specified type of control.
Retornos
true se o controle puder ser usado com a página atual; caso contrário, false.true if the control can be used with the current page; otherwise, false. O valor padrão é false.The default value is false.
Comentários
A TemplateParser classe verifica se os controles são permitidos em uma página no momento da análise.The TemplateParser class checks to see whether controls are permitted in a page at parse time. Substitua o AllowControl método para rejeitar ou permitir controles específicos em suas páginas.Override the AllowControl method to reject or permit specific controls in your pages.