Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1716 lines (1576 sloc) 118 KB
<Type Name="TemplateControl" FullName="System.Web.UI.TemplateControl">
<TypeSignature Language="C#" Value="public abstract class TemplateControl : System.Web.UI.Control, System.Web.UI.IFilterResolutionService, System.Web.UI.INamingContainer" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract TemplateControl extends System.Web.UI.Control implements class System.Web.UI.IFilterResolutionService, class System.Web.UI.INamingContainer" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.TemplateControl" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class TemplateControl&#xA;Inherits Control&#xA;Implements IFilterResolutionService, INamingContainer" />
<TypeSignature Language="C++ CLI" Value="public ref class TemplateControl abstract : System::Web::UI::Control, System::Web::UI::IFilterResolutionService, System::Web::UI::INamingContainer" />
<TypeSignature Language="F#" Value="type TemplateControl = class&#xA; inherit Control&#xA; interface INamingContainer&#xA; interface IFilterResolutionService" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.UI.Control</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Web.UI.IFilterResolutionService</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.INamingContainer</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Provides the <see cref="T:System.Web.UI.Page" /> class and the <see cref="T:System.Web.UI.UserControl" /> class with a base set of functionality.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl> class is an abstract class that provides common properties and methods for the <xref:System.Web.UI.Page> class and the <xref:System.Web.UI.UserControl> class. A new instance of the <xref:System.Web.UI.TemplateControl> is not created directly.
The <xref:System.Web.UI.TemplateControl> class defines methods supporting declarative data-binding expressions:
- Use the <xref:System.Web.UI.TemplateControl.Eval%2A> method for data-binding expression involving data sources, such as simple properties or expressions.
- Use the <xref:System.Web.UI.TemplateControl.XPath%2A> method for parsing and evaluating an XPath data-binding expression.
- Use the <xref:System.Web.UI.TemplateControl.XPathSelect%2A> method for data-binding against an expression containing an XPath select statement. The result is a node collection that implements the <xref:System.Collections.IEnumerable> interface.
For more information on data-binding expression, see [Data-Binding Expression Syntax](https://msdn.microsoft.com/library/676beb1d-ddfa-4153-bba8-3c86dcb7ceca) and [Binding to Databases](https://msdn.microsoft.com/library/ab7b2846-975b-4057-a948-45527497c742).
## Examples
The following code example demonstrates how to derive a control named `MyControl` from the <xref:System.Web.UI.TemplateControl> class and override the <xref:System.Web.UI.TemplateControl.Construct%2A> method. When `MyControl` is initialized, the overridden <xref:System.Web.UI.TemplateControl.Construct%2A> method is called.
[!code-csharp[TemplateControl_Sample1#1](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/tempcontrol_samples1.ascx.cs#1)]
[!code-vb[TemplateControl_Sample1#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.ascx.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.Page" />
<altmember cref="T:System.Web.UI.UserControl" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected TemplateControl ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; TemplateControl();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.TemplateControl" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.%23ctor%2A> constructor is not called directly.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AbortTransaction">
<MemberSignature Language="C#" Value="public event EventHandler AbortTransaction;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler AbortTransaction" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.TemplateControl.AbortTransaction" />
<MemberSignature Language="VB.NET" Value="Public Custom Event AbortTransaction As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ AbortTransaction;" />
<MemberSignature Language="F#" Value="member this.AbortTransaction : EventHandler " Usage="member this.AbortTransaction : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a user ends a transaction.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to register a custom event handler for the <xref:System.Web.UI.TemplateControl.AbortTransaction> event. Because <xref:System.Web.UI.TemplateControl> is an abstract class, this code example uses the <xref:System.Web.UI.Page> class, which is derived from the <xref:System.Web.UI.TemplateControl> class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended.
[!code-csharp[TemplateControl_OnCommitTransaction#1](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#1)]
[!code-vb[TemplateControl_OnCommitTransaction#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.TemplateControl.CommitTransaction" />
<altmember cref="E:System.Web.UI.TemplateControl.Error" />
<altmember cref="M:System.Web.UI.TemplateControl.OnAbortTransaction(System.EventArgs)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/w97s6fw4(v=vs.85)">Transaction Processing</related>
</Docs>
</Member>
<Member MemberName="AppRelativeVirtualPath">
<MemberSignature Language="C#" Value="public string AppRelativeVirtualPath { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AppRelativeVirtualPath" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.TemplateControl.AppRelativeVirtualPath" />
<MemberSignature Language="VB.NET" Value="Public Property AppRelativeVirtualPath As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ AppRelativeVirtualPath { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.AppRelativeVirtualPath : string with get, set" Usage="System.Web.UI.TemplateControl.AppRelativeVirtualPath" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the application-relative, virtual directory path to the file from which the control is parsed and compiled.</summary>
<value>A string representing the path.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the file that defines a <xref:System.Web.UI.TemplateControl> control resides in a directory other than that of the page processing the request, use the <xref:System.Web.UI.TemplateControl.AppRelativeVirtualPath%2A> property to return the application-relative, virtual path to the <xref:System.Web.UI.TemplateControl>.
The <xref:System.Web.UI.Control.AppRelativeTemplateSourceDirectory%2A> property is set based on the virtual path that is set in the <xref:System.Web.UI.TemplateControl.AppRelativeVirtualPath%2A> property.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The path that is set is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentException">The path that is set is not rooted.</exception>
<altmember cref="M:System.Web.VirtualPathUtility.MakeRelative(System.String,System.String)" />
<altmember cref="P:System.Web.UI.Control.AppRelativeTemplateSourceDirectory" />
<altmember cref="M:System.Web.UI.Control.ResolveUrl(System.String)" />
</Docs>
</Member>
<Member MemberName="AutoHandlers">
<MemberSignature Language="C#" Value="protected virtual int AutoHandlers { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 AutoHandlers" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.TemplateControl.AutoHandlers" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Property AutoHandlers As Integer" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property int AutoHandlers { int get(); void set(int value); };" />
<MemberSignature Language="F#" Value="member this.AutoHandlers : int with get, set" Usage="System.Web.UI.TemplateControl.AutoHandlers" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.Obsolete("Use of this property is not recommended because it is no longer useful. http://go.microsoft.com/fwlink/?linkid=14202")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>The <see cref="P:System.Web.UI.TemplateControl.AutoHandlers" /> property has been deprecated in ASP.NET NET 2.0. It is used by generated classes and is not intended for use within your code.</summary>
<value>Always 0.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CommitTransaction">
<MemberSignature Language="C#" Value="public event EventHandler CommitTransaction;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler CommitTransaction" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.TemplateControl.CommitTransaction" />
<MemberSignature Language="VB.NET" Value="Public Custom Event CommitTransaction As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ CommitTransaction;" />
<MemberSignature Language="F#" Value="member this.CommitTransaction : EventHandler " Usage="member this.CommitTransaction : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when a transaction completes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to register a custom event handler for the <xref:System.Web.UI.TemplateControl.CommitTransaction> event. Because <xref:System.Web.UI.TemplateControl> is an abstract class, this code example uses the <xref:System.Web.UI.Page> class, which is derived from the <xref:System.Web.UI.TemplateControl> class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended.
[!code-csharp[TemplateControl_OnCommitTransaction#2](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#2)]
[!code-vb[TemplateControl_OnCommitTransaction#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#2)]
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.TemplateControl.AbortTransaction" />
<altmember cref="E:System.Web.UI.TemplateControl.Error" />
<altmember cref="M:System.Web.UI.TemplateControl.OnCommitTransaction(System.EventArgs)" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/w97s6fw4(v=vs.85)">Transaction Processing</related>
</Docs>
</Member>
<Member MemberName="Construct">
<MemberSignature Language="C#" Value="protected virtual void Construct ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Construct() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.Construct" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Construct ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void Construct();" />
<MemberSignature Language="F#" Value="abstract member Construct : unit -&gt; unit&#xA;override this.Construct : unit -&gt; unit" Usage="templateControl.Construct " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Performs design-time logic.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.Construct%2A> method allows design-time code execution of the <xref:System.Web.UI.Page> and <xref:System.Web.UI.UserControl> controls.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.TemplateControl.Construct%2A> method of a custom control that is derived from the <xref:System.Web.UI.TemplateControl> class.
For the full definition of the `MyControl` class, see <xref:System.Web.UI.TemplateControl>.
[!code-csharp[TemplateControl_Sample1#2](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/tempcontrol_samples1.ascx.cs#2)]
[!code-vb[TemplateControl_Sample1#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.ascx.vb#2)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.OnInit(System.EventArgs)" />
</Docs>
</Member>
<Member MemberName="CreateResourceBasedLiteralControl">
<MemberSignature Language="C#" Value="protected System.Web.UI.LiteralControl CreateResourceBasedLiteralControl (int offset, int size, bool fAsciiOnly);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance class System.Web.UI.LiteralControl CreateResourceBasedLiteralControl(int32 offset, int32 size, bool fAsciiOnly) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.CreateResourceBasedLiteralControl(System.Int32,System.Int32,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Function CreateResourceBasedLiteralControl (offset As Integer, size As Integer, fAsciiOnly As Boolean) As LiteralControl" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Web::UI::LiteralControl ^ CreateResourceBasedLiteralControl(int offset, int size, bool fAsciiOnly);" />
<MemberSignature Language="F#" Value="member this.CreateResourceBasedLiteralControl : int * int * bool -&gt; System.Web.UI.LiteralControl" Usage="templateControl.CreateResourceBasedLiteralControl (offset, size, fAsciiOnly)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.LiteralControl</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="offset" Type="System.Int32" />
<Parameter Name="size" Type="System.Int32" />
<Parameter Name="fAsciiOnly" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="offset">The offset of the start of the string in the resource.</param>
<param name="size">The size of the string in bytes.</param>
<param name="fAsciiOnly">A Boolean value indicating if the string in the resource contains only 7-bit ASCII characters.</param>
<summary>Accesses literal strings stored in a resource. The <see cref="M:System.Web.UI.TemplateControl.CreateResourceBasedLiteralControl(System.Int32,System.Int32,System.Boolean)" /> method is not intended for use from within your code.</summary>
<returns>A <see cref="T:System.Web.UI.LiteralControl" /> representing a literal string in a resource.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.CreateResourceBasedLiteralControl%2A> method is used to access literal strings that are stored in a resource and is not intended for use from within your code.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.LiteralControl" />
</Docs>
</Member>
<Member MemberName="EnableTheming">
<MemberSignature Language="C#" Value="public override bool EnableTheming { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnableTheming" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.TemplateControl.EnableTheming" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property EnableTheming As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool EnableTheming { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.EnableTheming : bool with get, set" Usage="System.Web.UI.TemplateControl.EnableTheming" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.Browsable(true)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a Boolean value indicating whether themes apply to the control that is derived from the <see cref="T:System.Web.UI.TemplateControl" /> class.</summary>
<value>
<see langword="true" /> to use themes; otherwise, <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.EnableTheming%2A> property indicates whether themes are enabled for the control that is derived from the <xref:System.Web.UI.TemplateControl> class. When the <xref:System.Web.UI.TemplateControl.EnableTheming%2A> property is `true`, the theme directory for the application is searched for control skins to apply. If no skin for the particular control exists in the theme directory, skins are not applied.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.PageTheme" />
</Docs>
</Member>
<Member MemberName="Error">
<MemberSignature Language="C#" Value="public event EventHandler Error;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Error" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.TemplateControl.Error" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Error As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ Error;" />
<MemberSignature Language="F#" Value="member this.Error : EventHandler " Usage="member this.Error : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when an unhandled exception is thrown.</summary>
<remarks>To be added.</remarks>
<altmember cref="E:System.Web.UI.TemplateControl.AbortTransaction" />
<altmember cref="E:System.Web.UI.TemplateControl.CommitTransaction" />
</Docs>
</Member>
<MemberGroup MemberName="Eval">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Provides support for parsing and evaluating a data-binding expression against an object at run time.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Eval">
<MemberSignature Language="C#" Value="protected internal object Eval (string expression);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance object Eval(string expression) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.Eval(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function Eval (expression As String) As Object" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::Object ^ Eval(System::String ^ expression);" />
<MemberSignature Language="F#" Value="member this.Eval : string -&gt; obj" Usage="templateControl.Eval expression" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="expression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="expression">The navigation path from the container to the public property value to place in the bound control property.</param>
<summary>Evaluates a data-binding expression.</summary>
<returns>An object that results from the evaluation of the data-binding expression.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of `expression` must evaluate to a public property.
The <xref:System.Web.UI.TemplateControl.Eval%2A> method calls the <xref:System.Web.UI.DataBinder.Eval%2A?displayProperty=nameWithType> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the object reference that the expression is evaluated against.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The data-binding method can be used only for controls contained on a <see cref="T:System.Web.UI.Page" />.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="expression" /> is <see langword="null" />.
-or-
<paramref name="expression" /> is an empty string ("").</exception>
<altmember cref="T:System.Web.UI.DataBinder" />
</Docs>
</Member>
<Member MemberName="Eval">
<MemberSignature Language="C#" Value="protected internal string Eval (string expression, string format);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance string Eval(string expression, string format) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.Eval(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function Eval (expression As String, format As String) As String" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::String ^ Eval(System::String ^ expression, System::String ^ format);" />
<MemberSignature Language="F#" Value="member this.Eval : string * string -&gt; string" Usage="templateControl.Eval (expression, format)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="expression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="format" Type="System.String" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="expression">The navigation path from the container to the public property value to place in the bound control property.</param>
<param name="format">A .NET Framework format string to apply to the result.</param>
<summary>Evaluates a data-binding expression using the specified format string to display the result.</summary>
<returns>A string that results from the evaluation of the data-binding expression and conversion to a string type.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of `expression` must evaluate to a public property.
The <xref:System.Web.UI.TemplateControl.Eval%2A> method calls the <xref:System.Web.UI.DataBinder.Eval%2A> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the object reference that the expression is evaluated against.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The data-binding method can only be used for controls contained on a <see cref="T:System.Web.UI.Page" />.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="expression" /> is <see langword="null" />.
-or-
<paramref name="expression" /> is an empty string ("").</exception>
<altmember cref="T:System.Web.UI.DataBinder" />
<related type="Article" href="~/docs/standard/base-types/formatting-types.md">Formatting Types in .NET</related>
</Docs>
</Member>
<Member MemberName="FrameworkInitialize">
<MemberSignature Language="C#" Value="protected virtual void FrameworkInitialize ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void FrameworkInitialize() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.FrameworkInitialize" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub FrameworkInitialize ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void FrameworkInitialize();" />
<MemberSignature Language="F#" Value="abstract member FrameworkInitialize : unit -&gt; unit&#xA;override this.FrameworkInitialize : unit -&gt; unit" Usage="templateControl.FrameworkInitialize " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Initializes the control that is derived from the <see cref="T:System.Web.UI.TemplateControl" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Do not override the <xref:System.Web.UI.TemplateControl.FrameworkInitialize%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="GetGlobalResourceObject">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets an application-level resource.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetGlobalResourceObject">
<MemberSignature Language="C#" Value="protected object GetGlobalResourceObject (string className, string resourceKey);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance object GetGlobalResourceObject(string className, string resourceKey) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.GetGlobalResourceObject(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Function GetGlobalResourceObject (className As String, resourceKey As String) As Object" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Object ^ GetGlobalResourceObject(System::String ^ className, System::String ^ resourceKey);" />
<MemberSignature Language="F#" Value="member this.GetGlobalResourceObject : string * string -&gt; obj" Usage="templateControl.GetGlobalResourceObject (className, resourceKey)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="className" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="resourceKey" Type="System.String" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="className">A string representing a <see cref="P:System.Web.Compilation.ResourceExpressionFields.ClassKey" />.</param>
<param name="resourceKey">A string representing a <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" />.</param>
<summary>Gets an application-level resource object based on the specified <see cref="P:System.Web.Compilation.ResourceExpressionFields.ClassKey" /> and <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" /> properties.</summary>
<returns>An object representing the requested resource object; otherwise, <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Application-level resources are stored in the App_GlobalResources folder. For more information, see [Resources in ASP.NET Applications](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85)).
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.GetGlobalResourceObject%2A> method to access a string named `GlobalResourceString1` from a global resource named `MyResource.resx` in the App_GlobalResources folder. The `className` parameter is `MyResource` without the .resx extension.
[!code-aspx-csharp[System.Web.UI.TemplateControl_GetResources#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl_GetResources/cs/sourcecs.aspx#1)]
[!code-aspx-vb[System.Web.UI.TemplateControl_GetResources#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl_GetResources/vb/sourcevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Compilation.ResourceExpressionBuilder" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85)">Resources in ASP.NET Applications</related>
<related type="Article" href="~/docs/framework/resources/packaging-and-deploying-resources-in-desktop-apps.md">Packaging and Deploying Resources</related>
</Docs>
</Member>
<Member MemberName="GetGlobalResourceObject">
<MemberSignature Language="C#" Value="protected object GetGlobalResourceObject (string className, string resourceKey, Type objType, string propName);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance object GetGlobalResourceObject(string className, string resourceKey, class System.Type objType, string propName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.GetGlobalResourceObject(System.String,System.String,System.Type,System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Function GetGlobalResourceObject (className As String, resourceKey As String, objType As Type, propName As String) As Object" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Object ^ GetGlobalResourceObject(System::String ^ className, System::String ^ resourceKey, Type ^ objType, System::String ^ propName);" />
<MemberSignature Language="F#" Value="member this.GetGlobalResourceObject : string * string * Type * string -&gt; obj" Usage="templateControl.GetGlobalResourceObject (className, resourceKey, objType, propName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="className" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="resourceKey" Type="System.String" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="objType" Type="System.Type" Index="2" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="propName" Type="System.String" Index="3" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="className">A string representing a <see cref="P:System.Web.Compilation.ResourceExpressionFields.ClassKey" />.</param>
<param name="resourceKey">A string representing a <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" />.</param>
<param name="objType">The type of object in the resource to get.</param>
<param name="propName">The property name of the object to get.</param>
<summary>Gets an application-level resource object based on the specified <see cref="P:System.Web.Compilation.ResourceExpressionFields.ClassKey" /> and <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" /> properties, object type, and property name of the resource.</summary>
<returns>An object representing the requested resource object; otherwise, <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Application-level resources are stored in the App_GlobalResources folder. For more information, see [Resources in ASP.NET Applications](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85)).
]]></format>
</remarks>
<altmember cref="T:System.Web.Compilation.ResourceExpressionBuilder" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85)">Resources in ASP.NET Applications</related>
<related type="Article" href="~/docs/framework/resources/packaging-and-deploying-resources-in-desktop-apps.md">Packaging and Deploying Resources</related>
</Docs>
</Member>
<MemberGroup MemberName="GetLocalResourceObject">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets a page-level resource.</summary>
</Docs>
</MemberGroup>
<Member MemberName="GetLocalResourceObject">
<MemberSignature Language="C#" Value="protected object GetLocalResourceObject (string resourceKey);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance object GetLocalResourceObject(string resourceKey) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.GetLocalResourceObject(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Function GetLocalResourceObject (resourceKey As String) As Object" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Object ^ GetLocalResourceObject(System::String ^ resourceKey);" />
<MemberSignature Language="F#" Value="member this.GetLocalResourceObject : string -&gt; obj" Usage="templateControl.GetLocalResourceObject resourceKey" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="resourceKey" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="resourceKey">A string representing a <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" />.</param>
<summary>Gets a page-level resource object based on the specified <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" /> property.</summary>
<returns>An object representing the requested resource object; otherwise, <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Local resource files are stored in the App_LocalResources directory. For more information, see [Resources in ASP.NET Applications](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85))
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.GetLocalResourceObject%2A> method to access a string named `LocalResourceString1` from a local page resource that is located in the App_LocalResources folder.
[!code-aspx-csharp[System.Web.UI.TemplateControl_GetResources#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl_GetResources/cs/sourcecs.aspx#1)]
[!code-aspx-vb[System.Web.UI.TemplateControl_GetResources#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl_GetResources/vb/sourcevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.Compilation.ResourceExpressionBuilder" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85)">Resources in ASP.NET Applications</related>
<related type="Article" href="~/docs/framework/resources/packaging-and-deploying-resources-in-desktop-apps.md">Packaging and Deploying Resources</related>
</Docs>
</Member>
<Member MemberName="GetLocalResourceObject">
<MemberSignature Language="C#" Value="protected object GetLocalResourceObject (string resourceKey, Type objType, string propName);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance object GetLocalResourceObject(string resourceKey, class System.Type objType, string propName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.GetLocalResourceObject(System.String,System.Type,System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Function GetLocalResourceObject (resourceKey As String, objType As Type, propName As String) As Object" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; System::Object ^ GetLocalResourceObject(System::String ^ resourceKey, Type ^ objType, System::String ^ propName);" />
<MemberSignature Language="F#" Value="member this.GetLocalResourceObject : string * Type * string -&gt; obj" Usage="templateControl.GetLocalResourceObject (resourceKey, objType, propName)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="resourceKey" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="objType" Type="System.Type" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="propName" Type="System.String" Index="2" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="resourceKey">A string representing a <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" />.</param>
<param name="objType">The type of the resource object to get.</param>
<param name="propName">The property name of the resource object to get.</param>
<summary>Gets a page-level resource object based on the specified <see cref="P:System.Web.Compilation.ResourceExpressionFields.ResourceKey" /> property, object type, and property name.</summary>
<returns>An object representing the requested resource object; otherwise, <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Local resource files are stored in the App_LocalResources directory. For more information, see [Resources in ASP.NET Applications](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85))
]]></format>
</remarks>
<altmember cref="T:System.Web.Compilation.ResourceExpressionBuilder" />
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/1ztca10y(v=vs.85)">Resources in ASP.NET Applications</related>
<related type="Article" href="~/docs/framework/resources/packaging-and-deploying-resources-in-desktop-apps.md">Packaging and Deploying Resources</related>
</Docs>
</Member>
<MemberGroup MemberName="LoadControl">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Loads a <see cref="T:System.Web.UI.Control" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you load a control into a container control, the container raises all of the added control's events until it has caught up to the current event. However, the added control does not catch up with postback data processing. For an added control to participate in postback data processing, including validation, the control must be added in the <xref:System.Web.UI.Control.Init> event rather than in the <xref:System.Web.UI.Control.Load> event.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.OnInit(System.EventArgs)" />
<altmember cref="M:System.Web.UI.Control.OnLoad(System.EventArgs)" />
<related type="Article" href="https://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">ASP.NET Page Life Cycle Overview</related>
</Docs>
</MemberGroup>
<Member MemberName="LoadControl">
<MemberSignature Language="C#" Value="public System.Web.UI.Control LoadControl (string virtualPath);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.Control LoadControl(string virtualPath) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.LoadControl(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function LoadControl (virtualPath As String) As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Web::UI::Control ^ LoadControl(System::String ^ virtualPath);" />
<MemberSignature Language="F#" Value="member this.LoadControl : string -&gt; System.Web.UI.Control" Usage="templateControl.LoadControl virtualPath" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="virtualPath" Type="System.String" />
</Parameters>
<Docs>
<param name="virtualPath">The virtual path to a control file.</param>
<summary>Loads a <see cref="T:System.Web.UI.Control" /> object from a file based on a specified virtual path.</summary>
<returns>Returns the specified <see cref="T:System.Web.UI.Control" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the control supports caching, the object returned from the <xref:System.Web.UI.TemplateControl.LoadControl%2A> method is not actually a <xref:System.Web.UI.Control> object; rather, it is a <xref:System.Web.UI.PartialCachingControl> object. If the `virtualPath` parameter is relative, the path of the loaded control is relative to the path of the <xref:System.Web.UI.TemplateControl>.
When you load a control into a container control, the container raises all of the added control's events until it has caught up to the current event. However, the added control does not catch up with postback data processing. For an added control to participate in postback data processing, including validation, the control must be added in the <xref:System.Web.UI.Control.Init> event rather than in the <xref:System.Web.UI.Control.Load> event.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.LoadControl%2A> method to add a user control to an ASP.NET page.
In the `OnInit` event method, this page uses the <xref:System.Web.UI.TemplateControl.LoadControl%2A> method to programmatically create a user control on the page. The method adds the control to the <xref:System.Web.UI.Control.Controls%2A> property of a <xref:System.Web.UI.WebControls.PlaceHolder> Web server control named `Placeholder1`.
For the definition of the `MyControl` class that is used in this code example, see <xref:System.Web.UI.TemplateControl>.
[!code-csharp[TemplateControl_Sample1#3](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplateControl_Sample1/CS/TempControl_Samples1.aspx#3)]
[!code-vb[TemplateControl_Sample1#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_Sample1/VB/tempcontrol_samples1.aspx#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The virtual path is <see langword="null" /> or empty.</exception>
<altmember cref="T:System.Web.UI.UserControl" />
<altmember cref="M:System.Web.UI.TemplateControl.LoadControl(System.Type,System.Object[])" />
<altmember cref="M:System.Web.UI.Control.OnInit(System.EventArgs)" />
<altmember cref="M:System.Web.UI.Control.OnLoad(System.EventArgs)" />
<related type="Article" href="https://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">ASP.NET Page Life Cycle Overview</related>
</Docs>
</Member>
<Member MemberName="LoadControl">
<MemberSignature Language="C#" Value="public System.Web.UI.Control LoadControl (Type t, object[] parameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.Control LoadControl(class System.Type t, object[] parameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.LoadControl(System.Type,System.Object[])" />
<MemberSignature Language="VB.NET" Value="Public Function LoadControl (t As Type, parameters As Object()) As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Web::UI::Control ^ LoadControl(Type ^ t, cli::array &lt;System::Object ^&gt; ^ parameters);" />
<MemberSignature Language="F#" Value="member this.LoadControl : Type * obj[] -&gt; System.Web.UI.Control" Usage="templateControl.LoadControl (t, parameters)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t" Type="System.Type" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="parameters" Type="System.Object[]" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="t">The type of the control.</param>
<param name="parameters">An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If <paramref name="parameters" /> is an empty array or <see langword="null" />, the constructor that takes no parameters (the parameterless constructor) is invoked.</param>
<summary>Loads a <see cref="T:System.Web.UI.Control" /> object based on a specified type and constructor parameters.</summary>
<returns>Returns the specified <see cref="T:System.Web.UI.UserControl" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the user control supports caching, the object returned from the <xref:System.Web.UI.TemplateControl.LoadControl%2A> method is not actually a <xref:System.Web.UI.UserControl> object; rather, it is a <xref:System.Web.UI.PartialCachingControl> object.
When you load a control into a container control, the container raises all of the added control's events until it has caught up to the current event. However, the added control does not catch up with postback data processing. For an added control to participate in postback data processing, including validation, the control must be added in the <xref:System.Web.UI.Control.Init> event rather than in the <xref:System.Web.UI.Control.Load> event.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.UserControl" />
<altmember cref="M:System.Web.UI.TemplateControl.LoadControl(System.String)" />
<altmember cref="M:System.Web.UI.Control.OnInit(System.EventArgs)" />
<altmember cref="M:System.Web.UI.Control.OnLoad(System.EventArgs)" />
<related type="Article" href="https://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">ASP.NET Page Life Cycle Overview</related>
</Docs>
</Member>
<Member MemberName="LoadTemplate">
<MemberSignature Language="C#" Value="public System.Web.UI.ITemplate LoadTemplate (string virtualPath);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.ITemplate LoadTemplate(string virtualPath) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.LoadTemplate(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function LoadTemplate (virtualPath As String) As ITemplate" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Web::UI::ITemplate ^ LoadTemplate(System::String ^ virtualPath);" />
<MemberSignature Language="F#" Value="member this.LoadTemplate : string -&gt; System.Web.UI.ITemplate" Usage="templateControl.LoadTemplate virtualPath" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.ITemplate</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="virtualPath" Type="System.String" />
</Parameters>
<Docs>
<param name="virtualPath">The virtual path to a user control file.</param>
<summary>Obtains an instance of the <see cref="T:System.Web.UI.ITemplate" /> interface from an external file.</summary>
<returns>An instance of the specified template.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.LoadTemplate%2A> method to add a user control as an alternating item to a <xref:System.Web.UI.WebControls.DataList> Web server control named `DataList1`. The user control implements the <xref:System.Web.UI.ITemplate> interface and is contained in a file named Newtemplate.ascx.
[!code-csharp[System.Web.UI.TemplateControl_LoadTemplate#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl_LoadTemplate/CS/loadtemplatecs.aspx#1)]
[!code-vb[System.Web.UI.TemplateControl_LoadTemplate#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl_LoadTemplate/VB/loadtemplatevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.ITemplate" />
</Docs>
</Member>
<Member MemberName="OnAbortTransaction">
<MemberSignature Language="C#" Value="protected virtual void OnAbortTransaction (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnAbortTransaction(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.OnAbortTransaction(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnAbortTransaction (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnAbortTransaction(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnAbortTransaction : EventArgs -&gt; unit&#xA;override this.OnAbortTransaction : EventArgs -&gt; unit" Usage="templateControl.OnAbortTransaction e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.TemplateControl.AbortTransaction" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.OnAbortTransaction%2A> and <xref:System.Web.UI.TemplateControl.OnCommitTransaction%2A> methods. Because <xref:System.Web.UI.TemplateControl> is an abstract class, this code example uses the <xref:System.Web.UI.Page> class, which is derived from the <xref:System.Web.UI.TemplateControl> class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended.
[!code-csharp[TemplateControl_OnCommitTransaction#3](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#3)]
[!code-vb[TemplateControl_OnCommitTransaction#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#3)]
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/w97s6fw4(v=vs.85)">Transaction Processing</related>
</Docs>
</Member>
<Member MemberName="OnCommitTransaction">
<MemberSignature Language="C#" Value="protected virtual void OnCommitTransaction (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnCommitTransaction(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.OnCommitTransaction(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnCommitTransaction (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnCommitTransaction(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnCommitTransaction : EventArgs -&gt; unit&#xA;override this.OnCommitTransaction : EventArgs -&gt; unit" Usage="templateControl.OnCommitTransaction e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.TemplateControl.CommitTransaction" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use the <xref:System.Web.UI.TemplateControl.OnCommitTransaction%2A> method for any transaction processing logic in which your page or user control participates.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.OnAbortTransaction%2A> and <xref:System.Web.UI.TemplateControl.OnCommitTransaction%2A> methods. Because <xref:System.Web.UI.TemplateControl> is an abstract class, this code example uses the <xref:System.Web.UI.Page> class, which is derived from the <xref:System.Web.UI.TemplateControl> class. `Account` is a class that supports a `Debit` operation, which is transactional and must execute as a unit. If any exception is raised during this operation, the transaction is ended.
[!code-csharp[TemplateControl_OnCommitTransaction#2](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/CS/templatecontrol_oncommittransaction.cs.aspx#2)]
[!code-vb[TemplateControl_OnCommitTransaction#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplateControl_OnCommitTransaction/VB/templatecontrol_oncommittransaction.vb.aspx#2)]
]]></format>
</remarks>
<related type="Article" href="https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/w97s6fw4(v=vs.85)">Transaction Processing</related>
</Docs>
</Member>
<Member MemberName="OnError">
<MemberSignature Language="C#" Value="protected virtual void OnError (EventArgs e);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnError(class System.EventArgs e) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.OnError(System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnError (e As EventArgs)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnError(EventArgs ^ e);" />
<MemberSignature Language="F#" Value="abstract member OnError : EventArgs -&gt; unit&#xA;override this.OnError : EventArgs -&gt; unit" Usage="templateControl.OnError e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="e">An <see cref="T:System.EventArgs" /> that contains the event data.</param>
<summary>Raises the <see cref="E:System.Web.UI.TemplateControl.Error" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates a possible way to use of the <xref:System.Web.UI.TemplateControl.OnError%2A> method. It creates a string with some arguments that are not valid, which leads to an exception. Because the <xref:System.Web.UI.TemplateControl> class is an abstract class, this code example was written using the <xref:System.Web.UI.Page> class, which is derived from the <xref:System.Web.UI.TemplateControl> class.
```vb
<%@ Page language="VB" %>
<html>
<head>
<script language="VB" runat="server">
Sub Page_Load(sender as object, e as System.EventArgs)
AddHandler Page.Error, AddressOf Error_Handler
try
Dim myString as string = "Hello"
'An exception is raised because the length of 'myString' is less than '6'.
Dim mySubString as string= myString.Substring(0,6)
catch e1 As Exception
OnError (EventArgs.Empty)
End try
End Sub
Sub Error_Handler(sender as object,e as System.EventArgs)
Response.Write("<br><b>An Error was raised</b>")
End Sub
</script>
</head>
</html>
```
```csharp
<%@ Page language="c#" %>
<html>
<head>
<script language="C#" runat="server">
void Page_Load(object sender, System.EventArgs e)
{
Page.Error += new System.EventHandler(Error_Handler);
try
{
string myString = "Hello";
// An exception is raised because the length of 'myString' is less than '6'.
string mySubString = myString.Substring(0,6);
}
catch(Exception)
{
OnError(EventArgs.Empty);
}
}
void Error_Handler(object sender,System.EventArgs e)
{
Response.Write("<br><b>An Error was raised</b>");
}
</script>
</head>
</html>
```
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="ParseControl">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Parses an input string into a <see cref="T:System.Web.UI.Control" /> object on the ASP.NET Web page or user control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Web.UI.TemplateControl.ParseControl%2A> is introduced in the .NET Framework version 3.5. For more information, see [Versions and Dependencies](~/docs/framework/migration-guide/versions-and-dependencies.md).
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="ParseControl">
<MemberSignature Language="C#" Value="public System.Web.UI.Control ParseControl (string content);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.Control ParseControl(string content) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.ParseControl(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function ParseControl (content As String) As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Web::UI::Control ^ ParseControl(System::String ^ content);" />
<MemberSignature Language="F#" Value="member this.ParseControl : string -&gt; System.Web.UI.Control" Usage="templateControl.ParseControl content" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="System.String" />
</Parameters>
<Docs>
<param name="content">A string that contains a user control.</param>
<summary>Parses an input string into a <see cref="T:System.Web.UI.Control" /> object on the Web Forms page or user control.</summary>
<returns>The parsed <see cref="T:System.Web.UI.Control" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `content` parameter contains a user control, such as you would find in an .ascx file. This string cannot contain any code, because the <xref:System.Web.UI.TemplateControl.ParseControl%2A> method never causes compilation.
## Examples
The following code example demonstrates how to create a <xref:System.Web.UI.WebControls.Button> Web server control using the <xref:System.Web.UI.TemplateControl.ParseControl%2A> method, and then adds the result to the <xref:System.Web.UI.ControlCollection> collection of a <xref:System.Web.UI.WebControls.PlaceHolder> Web server control named `myPlaceholder`.
[!code-aspx-csharp[System.Web.UI.TemplateControl.ParseControl#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl.ParseControl/CS/templatecontrol_parsecontrolcs.aspx#1)]
[!code-aspx-vb[System.Web.UI.TemplateControl.ParseControl#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl.ParseControl/VB/templatecontrol_parsecontrolvb.aspx#1)]
]]></format>
</remarks>
<altmember cref="Overload:System.Web.UI.TemplateControl.LoadControl" />
</Docs>
</Member>
<Member MemberName="ParseControl">
<MemberSignature Language="C#" Value="public System.Web.UI.Control ParseControl (string content, bool ignoreParserFilter);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Web.UI.Control ParseControl(string content, bool ignoreParserFilter) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.ParseControl(System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Function ParseControl (content As String, ignoreParserFilter As Boolean) As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Web::UI::Control ^ ParseControl(System::String ^ content, bool ignoreParserFilter);" />
<MemberSignature Language="F#" Value="member this.ParseControl : string * bool -&gt; System.Web.UI.Control" Usage="templateControl.ParseControl (content, ignoreParserFilter)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="content" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="ignoreParserFilter" Type="System.Boolean" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="content">A string that contains a user control.</param>
<param name="ignoreParserFilter">A value that specifies whether to ignore the parser filter.</param>
<summary>Parses an input string into a <see cref="T:System.Web.UI.Control" /> object on the ASP.NET Web page or user control.</summary>
<returns>The parsed control.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `content` parameter contains a user control (the contents of an .ascx file). This string cannot contain any code, because the <xref:System.Web.UI.TemplateControl.ParseControl%2A> method never causes compilation.
The `ignoreParserFilter` parameter allows the <xref:System.Web.UI.PageParserFilter> class to be ignored. The <xref:System.Web.UI.PageParserFilter> class is used by the ASP.NET parser to determine whether an item is allowed in the page at parse time.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="ReadStringResource">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Reads a string resource.</summary>
</Docs>
</MemberGroup>
<Member MemberName="ReadStringResource">
<MemberSignature Language="C#" Value="public object ReadStringResource ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance object ReadStringResource() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.ReadStringResource" />
<MemberSignature Language="VB.NET" Value="Public Function ReadStringResource () As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Object ^ ReadStringResource();" />
<MemberSignature Language="F#" Value="member this.ReadStringResource : unit -&gt; obj" Usage="templateControl.ReadStringResource " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Reads a string resource. The <see cref="M:System.Web.UI.TemplateControl.ReadStringResource" /> method is not intended for use from within your code.</summary>
<returns>An object representing the resource.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.ReadStringResource%2A> method is not intended for use from within your code.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The <see cref="M:System.Web.UI.TemplateControl.ReadStringResource" /> is no longer supported.</exception>
</Docs>
</Member>
<Member MemberName="ReadStringResource">
<MemberSignature Language="C#" Value="public static object ReadStringResource (Type t);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig object ReadStringResource(class System.Type t) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.ReadStringResource(System.Type)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function ReadStringResource (t As Type) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Object ^ ReadStringResource(Type ^ t);" />
<MemberSignature Language="F#" Value="static member ReadStringResource : Type -&gt; obj" Usage="System.Web.UI.TemplateControl.ReadStringResource t" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t" Type="System.Type" />
</Parameters>
<Docs>
<param name="t">The <see cref="T:System.Type" /> of the resource to read.</param>
<summary>Reads a string resource. The <see cref="M:System.Web.UI.TemplateControl.ReadStringResource(System.Type)" /> method is not intended for use from within your code.</summary>
<returns>An object representing the resource.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.ReadStringResource%2A> method is not intended for use from within your code.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SetStringResourcePointer">
<MemberSignature Language="C#" Value="protected void SetStringResourcePointer (object stringResourcePointer, int maxResourceOffset);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void SetStringResourcePointer(object stringResourcePointer, int32 maxResourceOffset) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.SetStringResourcePointer(System.Object,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Sub SetStringResourcePointer (stringResourcePointer As Object, maxResourceOffset As Integer)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void SetStringResourcePointer(System::Object ^ stringResourcePointer, int maxResourceOffset);" />
<MemberSignature Language="F#" Value="member this.SetStringResourcePointer : obj * int -&gt; unit" Usage="templateControl.SetStringResourcePointer (stringResourcePointer, maxResourceOffset)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stringResourcePointer" Type="System.Object" />
<Parameter Name="maxResourceOffset" Type="System.Int32" />
</Parameters>
<Docs>
<param name="stringResourcePointer">An object representing the pointer to the string resource.</param>
<param name="maxResourceOffset">The resource size.</param>
<summary>Sets a pointer to a string resource. The <see cref="M:System.Web.UI.TemplateControl.SetStringResourcePointer(System.Object,System.Int32)" /> method is used by generated classes and is not intended for use from within your code.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SupportAutoEvents">
<MemberSignature Language="C#" Value="protected virtual bool SupportAutoEvents { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool SupportAutoEvents" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.TemplateControl.SupportAutoEvents" />
<MemberSignature Language="VB.NET" Value="Protected Overridable ReadOnly Property SupportAutoEvents As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual property bool SupportAutoEvents { bool get(); };" />
<MemberSignature Language="F#" Value="member this.SupportAutoEvents : bool" Usage="System.Web.UI.TemplateControl.SupportAutoEvents" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the <see cref="T:System.Web.UI.TemplateControl" /> control supports automatic events.</summary>
<value>Always <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.SupportAutoEvents%2A> property indicates whether automatic events are supported. The <xref:System.Web.UI.TemplateControl.SupportAutoEvents%2A> property is read-only and is `true` for all cases.
]]></format>
</remarks>
<related type="Article" href="https://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="System.Web.UI.IFilterResolutionService.CompareFilters">
<MemberSignature Language="C#" Value="int IFilterResolutionService.CompareFilters (string filter1, string filter2);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance int32 System.Web.UI.IFilterResolutionService.CompareFilters(string filter1, string filter2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.System#Web#UI#IFilterResolutionService#CompareFilters(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Function CompareFilters (filter1 As String, filter2 As String) As Integer Implements IFilterResolutionService.CompareFilters" />
<MemberSignature Language="C++ CLI" Value=" virtual int System.Web.UI.IFilterResolutionService.CompareFilters(System::String ^ filter1, System::String ^ filter2) = System::Web::UI::IFilterResolutionService::CompareFilters;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IFilterResolutionService.CompareFilters(System.String,System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filter1" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="filter2" Type="System.String" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="filter1">A device filter name.</param>
<param name="filter2">A device filter name.</param>
<summary>Returns a value that indicates whether a parent/child relationship exists between two specified device filters.</summary>
<returns>1, if <paramref name="filter1" /> is a parent of <paramref name="filter2" />; -1, if <paramref name="filter2" /> is a parent of <paramref name="filter1" />; otherwise, 0, if there is no parent/child relationship between <paramref name="filter1" /> and <paramref name="filter2" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.System%23Web%23UI%23IFilterResolutionService%23CompareFilters%2A> method is part of the <xref:System.Web.UI.IFilterResolutionService> interface, which is specific to how a control uses device filters in a designer environment. When controls are parsed or persisted in the designer environment outside the context of a browser request, the <xref:System.Web.UI.IFilterResolutionService> provides a way to determine if the current control is affected by a named filter and whether a named filter is part of a specific device-filter hierarchy.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.TemplateControl.System#Web#UI#IFilterResolutionService#EvaluateFilter(System.String)" />
</Docs>
</Member>
<Member MemberName="System.Web.UI.IFilterResolutionService.EvaluateFilter">
<MemberSignature Language="C#" Value="bool IFilterResolutionService.EvaluateFilter (string filterName);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance bool System.Web.UI.IFilterResolutionService.EvaluateFilter(string filterName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.System#Web#UI#IFilterResolutionService#EvaluateFilter(System.String)" />
<MemberSignature Language="VB.NET" Value="Function EvaluateFilter (filterName As String) As Boolean Implements IFilterResolutionService.EvaluateFilter" />
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Web.UI.IFilterResolutionService.EvaluateFilter(System::String ^ filterName) = System::Web::UI::IFilterResolutionService::EvaluateFilter;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IFilterResolutionService.EvaluateFilter(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filterName" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="filterName">The name of a device filter.</param>
<summary>Returns a value that indicates whether the specified filter is a type of the current filter object.</summary>
<returns>
<see langword="true" /> if the specified filter is a type applicable to the current filter object; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.System%23Web%23UI%23IFilterResolutionService%23EvaluateFilter%2A> method is part of the <xref:System.Web.UI.IFilterResolutionService> interface, which is specific to how a control uses device filters in a designer environment. When controls are parsed or persisted in the designer environment outside the context of a browser request, the <xref:System.Web.UI.IFilterResolutionService> provides a way to determine if the current control is affected by a named filter and whether a named filter is part of a specific device-filter hierarchy.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.TemplateControl.System#Web#UI#IFilterResolutionService#CompareFilters(System.String,System.String)" />
</Docs>
</Member>
<Member MemberName="TestDeviceFilter">
<MemberSignature Language="C#" Value="public virtual bool TestDeviceFilter (string filterName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool TestDeviceFilter(string filterName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.TestDeviceFilter(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function TestDeviceFilter (filterName As String) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool TestDeviceFilter(System::String ^ filterName);" />
<MemberSignature Language="F#" Value="abstract member TestDeviceFilter : string -&gt; bool&#xA;override this.TestDeviceFilter : string -&gt; bool" Usage="templateControl.TestDeviceFilter filterName" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filterName" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="filterName">The browser name to test.</param>
<summary>Returns a Boolean value indicating whether a device filter applies to the HTTP request.</summary>
<returns>
<see langword="true" /> if the client browser specified in <paramref name="filterName" /> is the same as the specified browser; otherwise, <see langword="false" />. The default is <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.TestDeviceFilter%2A> method invokes the <xref:System.Web.Configuration.HttpCapabilitiesBase.IsBrowser%2A> method. For more information on device filtering, see [Device Filtering Overview](https://msdn.microsoft.com/library/bdfeaa58-dedd-4c0d-8610-988aac0eff19(v=vs.100)).
]]></format>
</remarks>
<altmember cref="T:System.Web.HttpContext" />
<altmember cref="T:System.Web.HttpRequest" />
<altmember cref="M:System.Web.Configuration.HttpCapabilitiesBase.IsBrowser(System.String)" />
<related type="Article" href="https://msdn.microsoft.com/library/bdfeaa58-dedd-4c0d-8610-988aac0eff19(v=vs.100)">Introduction to Device Filtering in ASP.NET</related>
</Docs>
</Member>
<Member MemberName="WriteUTF8ResourceString">
<MemberSignature Language="C#" Value="protected void WriteUTF8ResourceString (System.Web.UI.HtmlTextWriter output, int offset, int size, bool fAsciiOnly);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void WriteUTF8ResourceString(class System.Web.UI.HtmlTextWriter output, int32 offset, int32 size, bool fAsciiOnly) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.WriteUTF8ResourceString(System.Web.UI.HtmlTextWriter,System.Int32,System.Int32,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Sub WriteUTF8ResourceString (output As HtmlTextWriter, offset As Integer, size As Integer, fAsciiOnly As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void WriteUTF8ResourceString(System::Web::UI::HtmlTextWriter ^ output, int offset, int size, bool fAsciiOnly);" />
<MemberSignature Language="F#" Value="member this.WriteUTF8ResourceString : System.Web.UI.HtmlTextWriter * int * int * bool -&gt; unit" Usage="templateControl.WriteUTF8ResourceString (output, offset, size, fAsciiOnly)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="output" Type="System.Web.UI.HtmlTextWriter" />
<Parameter Name="offset" Type="System.Int32" />
<Parameter Name="size" Type="System.Int32" />
<Parameter Name="fAsciiOnly" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="output">The control to write to.</param>
<param name="offset">The starting position within <c>value</c>.</param>
<param name="size">The number of characters within <c>value</c> to use.</param>
<param name="fAsciiOnly">
<see langword="true" /> to bypass re-encoding; otherwise, <see langword="false" />.</param>
<summary>Writes a resource string to an <see cref="T:System.Web.UI.HtmlTextWriter" /> control. The <see cref="M:System.Web.UI.TemplateControl.WriteUTF8ResourceString(System.Web.UI.HtmlTextWriter,System.Int32,System.Int32,System.Boolean)" /> method is used by generated classes and is not intended for use from within your code.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">Data that is not valid is being accessed; <paramref name="offset" /> or <paramref name="size" /> is less than zero.
-or-
The sum of <paramref name="offset" /> and <paramref name="size" /> is greater than the resource size.</exception>
</Docs>
</Member>
<MemberGroup MemberName="XPath">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Provides support for parsing and evaluating an XPath data-binding expression against an object at run time.</summary>
</Docs>
</MemberGroup>
<Member MemberName="XPath">
<MemberSignature Language="C#" Value="protected internal object XPath (string xPathExpression);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance object XPath(string xPathExpression) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.XPath(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function XPath (xPathExpression As String) As Object" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::Object ^ XPath(System::String ^ xPathExpression);" />
<MemberSignature Language="F#" Value="member this.XPath : string -&gt; obj" Usage="templateControl.XPath xPathExpression" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="xPathExpression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="xPathExpression">The XPath expression to evaluate. For more information, see <see cref="T:System.Web.UI.XPathBinder" />.</param>
<summary>Evaluates an XPath data-binding expression.</summary>
<returns>An object that results from the evaluation of the data-binding expression.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.XPath%2A> method calls the <xref:System.Web.UI.XPathBinder.Eval%2A?displayProperty=nameWithType> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the <xref:System.Xml.XPath.IXPathNavigable> object reference that the expression is evaluated against.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.XPath%2A> method in a <xref:System.Web.UI.WebControls.Repeater> control.
[!code-aspx-csharp[System.Web.UI.TemplateControl_XPath1#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl_XPath1/cs/templatecontrolxpathcs.aspx#1)]
[!code-aspx-vb[System.Web.UI.TemplateControl_XPath1#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl_XPath1/vb/templatecontrolxpathvb.aspx#1)]
The following test XML data can be used in the preceding code example.
```
<contacts>
<contact id="1">
<name>contact name 1</name>
<note>contact note 1</note>
</contact>
<contact id="2">
<name>contact name 2</name>
<note>contact note 2</note>
</contact>
</contacts>
```
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The data-binding method can be used only for controls contained on a <see cref="T:System.Web.UI.Page" />.</exception>
<altmember cref="T:System.Web.UI.XPathBinder" />
</Docs>
</Member>
<Member MemberName="XPath">
<MemberSignature Language="C#" Value="protected internal string XPath (string xPathExpression, string format);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance string XPath(string xPathExpression, string format) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.XPath(System.String,System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function XPath (xPathExpression As String, format As String) As String" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::String ^ XPath(System::String ^ xPathExpression, System::String ^ format);" />
<MemberSignature Language="F#" Value="member this.XPath : string * string -&gt; string" Usage="templateControl.XPath (xPathExpression, format)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="xPathExpression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="format" Type="System.String" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="xPathExpression">The XPath expression to evaluate. For more information, see <see cref="T:System.Web.UI.XPathBinder" />.</param>
<param name="format">A .NET Framework format string to apply to the result.</param>
<summary>Evaluates an XPath data-binding expression using the specified format string to display the result.</summary>
<returns>A string that results from the evaluation of the data-binding expression and conversion to a string type.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.XPath%2A> method calls the <xref:System.Web.UI.XPathBinder.Eval%2A?displayProperty=nameWithType> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the <xref:System.Xml.XPath.IXPathNavigable> object reference that the expression is evaluated against.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The data-binding method can be used only for controls contained on a <see cref="T:System.Web.UI.Page" />.</exception>
<altmember cref="T:System.Web.UI.XPathBinder" />
<related type="Article" href="~/docs/standard/base-types/formatting-types.md">Formatting Types in .NET</related>
</Docs>
</Member>
<Member MemberName="XPath">
<MemberSignature Language="C#" Value="protected internal object XPath (string xPathExpression, System.Xml.IXmlNamespaceResolver resolver);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance object XPath(string xPathExpression, class System.Xml.IXmlNamespaceResolver resolver) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.XPath(System.String,System.Xml.IXmlNamespaceResolver)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function XPath (xPathExpression As String, resolver As IXmlNamespaceResolver) As Object" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::Object ^ XPath(System::String ^ xPathExpression, System::Xml::IXmlNamespaceResolver ^ resolver);" />
<MemberSignature Language="F#" Value="member this.XPath : string * System.Xml.IXmlNamespaceResolver -&gt; obj" Usage="templateControl.XPath (xPathExpression, resolver)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="xPathExpression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="resolver" Type="System.Xml.IXmlNamespaceResolver" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="xPathExpression">The XPath expression to evaluate. For more information, see <see cref="T:System.Web.UI.XPathBinder" />.</param>
<param name="resolver">A set of prefix and namespace mappings used for namespace resolution.</param>
<summary>Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution.</summary>
<returns>An object that results from the evaluation of the data-binding expression.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.XPath%2A> method calls the <xref:System.Web.UI.XPathBinder.Eval%2A?displayProperty=nameWithType> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the <xref:System.Xml.XPath.IXPathNavigable> object reference that the expression is evaluated against.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The data-binding method can be used only for controls contained on a <see cref="T:System.Web.UI.Page" />.</exception>
<altmember cref="T:System.Web.UI.XPathBinder" />
</Docs>
</Member>
<Member MemberName="XPath">
<MemberSignature Language="C#" Value="protected internal string XPath (string xPathExpression, string format, System.Xml.IXmlNamespaceResolver resolver);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance string XPath(string xPathExpression, string format, class System.Xml.IXmlNamespaceResolver resolver) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.XPath(System.String,System.String,System.Xml.IXmlNamespaceResolver)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function XPath (xPathExpression As String, format As String, resolver As IXmlNamespaceResolver) As String" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::String ^ XPath(System::String ^ xPathExpression, System::String ^ format, System::Xml::IXmlNamespaceResolver ^ resolver);" />
<MemberSignature Language="F#" Value="member this.XPath : string * string * System.Xml.IXmlNamespaceResolver -&gt; string" Usage="templateControl.XPath (xPathExpression, format, resolver)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="xPathExpression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="format" Type="System.String" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="resolver" Type="System.Xml.IXmlNamespaceResolver" Index="2" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="xPathExpression">The XPath expression to evaluate. For more information, see <see cref="T:System.Web.UI.XPathBinder" />.</param>
<param name="format">A .NET Framework format string to apply to the result.</param>
<param name="resolver">A set of prefix and namespace mappings used for namespace resolution.</param>
<summary>Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution and the specified format string to display the result.</summary>
<returns>A string that results from the evaluation of the data-binding expression and conversion to a string type.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.XPath%2A> method calls the <xref:System.Web.UI.XPathBinder.Eval%2A?displayProperty=nameWithType> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the <xref:System.Xml.XPath.IXPathNavigable> object reference that the expression is evaluated against.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The data-binding method can be used only for controls contained on a <see cref="T:System.Web.UI.Page" />.</exception>
<altmember cref="T:System.Web.UI.XPathBinder" />
<related type="Article" href="~/docs/standard/base-types/formatting-types.md">Formatting Types in .NET</related>
</Docs>
</Member>
<MemberGroup MemberName="XPathSelect">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Provides run-time data binding against XML-based data and returns a node collection that implements the <see cref="T:System.Collections.IEnumerable" /> interface.</summary>
</Docs>
</MemberGroup>
<Member MemberName="XPathSelect">
<MemberSignature Language="C#" Value="protected internal System.Collections.IEnumerable XPathSelect (string xPathExpression);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance class System.Collections.IEnumerable XPathSelect(string xPathExpression) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.XPathSelect(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function XPathSelect (xPathExpression As String) As IEnumerable" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::Collections::IEnumerable ^ XPathSelect(System::String ^ xPathExpression);" />
<MemberSignature Language="F#" Value="member this.XPathSelect : string -&gt; System.Collections.IEnumerable" Usage="templateControl.XPathSelect xPathExpression" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerable</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="xPathExpression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="xPathExpression">The XPath expression to evaluate. For more information, see <see cref="T:System.Web.UI.XPathBinder" />.</param>
<summary>Evaluates an XPath data-binding expression and returns a node collection that implements the <see cref="T:System.Collections.IEnumerable" /> interface.</summary>
<returns>An <see cref="T:System.Collections.IEnumerable" /> node list.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.XPathSelect%2A> method calls the <xref:System.Web.UI.XPathBinder.Select%2A?displayProperty=nameWithType> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the <xref:System.Xml.XPath.IXPathNavigable> object reference that the expression is evaluated against.
## Examples
The following code example demonstrates how to use the <xref:System.Web.UI.TemplateControl.XPathSelect%2A> method in a <xref:System.Web.UI.WebControls.Repeater> control.
[!code-aspx-csharp[System.Web.UI.TemplateControl_XPath1#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.TemplateControl_XPath1/cs/templatecontrolxpathcs.aspx#1)]
[!code-aspx-vb[System.Web.UI.TemplateControl_XPath1#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.TemplateControl_XPath1/vb/templatecontrolxpathvb.aspx#1)]
The following test XML data can be used in the preceding code example.
```
<contacts>
<contact id="1">
<name>contact name 1</name>
<note>contact note 1</note>
</contact>
<contact id="2">
<name>contact name 2</name>
<note>contact note 2</note>
</contact>
</contacts>
```
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.XPathBinder" />
</Docs>
</Member>
<Member MemberName="XPathSelect">
<MemberSignature Language="C#" Value="protected internal System.Collections.IEnumerable XPathSelect (string xPathExpression, System.Xml.IXmlNamespaceResolver resolver);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance class System.Collections.IEnumerable XPathSelect(string xPathExpression, class System.Xml.IXmlNamespaceResolver resolver) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.TemplateControl.XPathSelect(System.String,System.Xml.IXmlNamespaceResolver)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function XPathSelect (xPathExpression As String, resolver As IXmlNamespaceResolver) As IEnumerable" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::Collections::IEnumerable ^ XPathSelect(System::String ^ xPathExpression, System::Xml::IXmlNamespaceResolver ^ resolver);" />
<MemberSignature Language="F#" Value="member this.XPathSelect : string * System.Xml.IXmlNamespaceResolver -&gt; System.Collections.IEnumerable" Usage="templateControl.XPathSelect (xPathExpression, resolver)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerable</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="xPathExpression" Type="System.String" Index="0" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="resolver" Type="System.Xml.IXmlNamespaceResolver" Index="1" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="xPathExpression">The XPath expression to evaluate. For more information, see <see cref="T:System.Web.UI.XPathBinder" />.</param>
<param name="resolver">A set of prefix and namespace mappings used for namespace resolution.</param>
<summary>Evaluates an XPath data-binding expression using the specified prefix and namespace mappings for namespace resolution and returns a node collection that implements the <see cref="T:System.Collections.IEnumerable" /> interface.</summary>
<returns>An <see cref="T:System.Collections.IEnumerable" /> node list.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.TemplateControl.XPathSelect%2A> method calls the <xref:System.Web.UI.XPathBinder.Select%2A?displayProperty=nameWithType> method using the <xref:System.Web.UI.Page.GetDataItem%2A> method to resolve the <xref:System.Xml.XPath.IXPathNavigable> object reference that the expression is evaluated against.
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.XPathBinder" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.