IParserAccessor Interface


定義 ASP.NET 伺服器控制項必須在 HTML 或 XML 項目剖析時實作以便辨識的方法。Defines the method that ASP.NET server controls must implement to recognize when elements, either HTML or XML, are parsed.

public interface class IParserAccessor
public interface IParserAccessor
type IParserAccessor = interface
Public Interface IParserAccessor


剖析元素時, 會將這些專案辨識為可執行此介面之伺服器控制項的子控制項。When elements are parsed, they are recognized as child controls of the server control that implements this interface. 這些元素會轉換成物件。These elements are converted to objects. 當您執行此介面時, 您所建立的控制項會定義在通知元素已剖析之後, 所發生的處理。When you implement this interface, the control you create defines what processing occurs once it has been notified that an element has been parsed.

由於類別Control會實作為這個介面, 因此擴充該類別並覆寫其實作為AddParsedSubObject方法, 會比自行執行此介面更容易。Because the Control class implements this interface, it is easier to extend that class and override its implementation of the AddParsedSubObject method than to implement this interface yourself.



藉由 ASP.NET 伺服器控制項實作時,告知伺服器控制項 XML 或 HTML 已剖析。When implemented by an ASP.NET server control, notifies the server control that an element, either XML or HTML, was parsed.

Applies to

See also