Permalink
Fetching contributors…
Cannot retrieve contributors at this time
4862 lines (4343 sloc) 344 KB
<Type Name="Control" FullName="System.Web.UI.Control">
<TypeSignature Language="C#" Value="public class Control : IDisposable, System.ComponentModel.IComponent, System.Web.UI.IControlBuilderAccessor, System.Web.UI.IControlDesignerAccessor, System.Web.UI.IDataBindingsAccessor, System.Web.UI.IExpressionsAccessor, System.Web.UI.IParserAccessor, System.Web.UI.IUrlResolutionService" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Control extends System.Object implements class System.ComponentModel.IComponent, class System.IDisposable, class System.Web.UI.IControlBuilderAccessor, class System.Web.UI.IControlDesignerAccessor, class System.Web.UI.IDataBindingsAccessor, class System.Web.UI.IExpressionsAccessor, class System.Web.UI.IParserAccessor, class System.Web.UI.IUrlResolutionService" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.Control" />
<TypeSignature Language="VB.NET" Value="Public Class Control&#xA;Implements IComponent, IControlBuilderAccessor, IControlDesignerAccessor, IDataBindingsAccessor, IDisposable, IExpressionsAccessor, IParserAccessor, IUrlResolutionService" />
<TypeSignature Language="C++ CLI" Value="public ref class Control : IDisposable, System::ComponentModel::IComponent, System::Web::UI::IControlBuilderAccessor, System::Web::UI::IControlDesignerAccessor, System::Web::UI::IDataBindingsAccessor, System::Web::UI::IExpressionsAccessor, System::Web::UI::IParserAccessor, System::Web::UI::IUrlResolutionService" />
<TypeSignature Language="F#" Value="type Control = class&#xA; interface IComponent&#xA; interface IDisposable&#xA; interface IParserAccessor&#xA; interface IUrlResolutionService&#xA; interface IDataBindingsAccessor&#xA; interface IControlBuilderAccessor&#xA; interface IControlDesignerAccessor&#xA; interface IExpressionsAccessor" />
<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.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ComponentModel.IComponent</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IControlBuilderAccessor</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IControlDesignerAccessor</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IDataBindingsAccessor</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IExpressionsAccessor</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IParserAccessor</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Web.UI.IUrlResolutionService</InterfaceName>
</Interface>
</Interfaces>
<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">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;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">
<AttributeName>System.ComponentModel.DefaultProperty("ID")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.Design.Serialization.DesignerSerializer("Microsoft.VisualStudio.Web.WebForms.ControlCodeDomSerializer, Microsoft.VisualStudio.Web, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.ControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;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">
<AttributeName>System.ComponentModel.DesignerCategory("Code")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.ToolboxItem("System.Web.UI.Design.WebControlToolboxItem, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.ToolboxItemFilter</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">
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Design.Serialization.DesignerSerializer("Microsoft.VSDesigner.WebForms.ControlCodeDomSerializer, Microsoft.VSDesigner, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.ControlDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.ToolboxItem("System.Web.UI.Design.WebControlToolboxItem, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.ToolboxItemFilter("System.Web.UI", System.ComponentModel.ToolboxItemFilterType.Require)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Design.Serialization.DesignerSerializer("Microsoft.VisualStudio.Web.WebForms.ControlCodeDomSerializer, Microsoft.VisualStudio.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Designer("System.Web.UI.Design.ControlDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.ToolboxItem("System.Web.UI.Design.WebControlToolboxItem, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Defines the properties, methods, and events that are shared by all ASP.NET server controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is the primary class that you derive from when you develop custom ASP.NET server controls. <xref:System.Web.UI.Control> does not have any user interface (UI) specific features. If you are authoring a control that does not have a UI, or combines other controls that render their own UI, derive from <xref:System.Web.UI.Control>. If you are authoring a control that does have a UI, derive from <xref:System.Web.UI.WebControls.WebControl> or any control in the <xref:System.Web.UI.WebControls> namespace that provides an appropriate starting point for your custom control.
The <xref:System.Web.UI.Control> class is the base class for all ASP.NET server controls, including custom controls, user controls, and pages. ASP.NET pages are instances of the <xref:System.Web.UI.Page> class, which inherits from the <xref:System.Web.UI.Control> class, and that handle requests for files that have an .aspx extension.
The <xref:System.Web.UI.Control> class can directly or indirectly be used as part of the user interface for your Web application, and as such should be scrutinized to make sure best practices for writing secure code and securing applications are followed.
For general information on these topics, see [Overview of Web Application Security Threats](http://msdn.microsoft.com/library/88d61678-f84e-4622-ae80-53128821855a), [NIB: Security Policy Best Practices](http://msdn.microsoft.com/library/d49bc4d5-efb7-4caa-a2fe-e4d3cec63c05), and [Key Security Concepts](~/docs/standard/security/key-security-concepts.md). For more specific information, see [Securing Standard Controls](http://msdn.microsoft.com/library/f3e7718f-63d0-44a3-bd5f-48cc2059c2a8), [How to: Display Safe Error Messages](http://msdn.microsoft.com/library/6f70ac33-6e11-4e98-ab7d-bae9c0e7eefa), [How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings](http://msdn.microsoft.com/library/6f67973f-dda0-45a1-ba9d-e88532d7dc5b), and [Introduction to the Validation Controls](https://docs.microsoft.com/previous-versions/dotnet/netframework-3.0/2e4hd649(v=vs.85)).
## Examples
The following example demonstrates a custom server control that derives from the <xref:System.Web.UI.Control> class. The `InnerContent` class overrides the <xref:System.Web.UI.Control.Render%2A?displayProperty=nameWithType> method, checks to see if the class has any child controls on the page and determines whether the first child of the control is a literal control. If both of these conditions are met, the overridden method writes the HTML string \<H2>Your Message:, the contents of the literal control, and a closing \</H2> tag to the Web Forms page.
> [!IMPORTANT]
> This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](http://msdn.microsoft.com/library/772c7312-211a-4eb3-8d6e-eec0aa1dcc07).
[!code-csharp[Classic Control Example#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Control Example/CS/source.cs#1)]
[!code-vb[Classic Control Example#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Control Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.Page" />
<altmember cref="T:System.Web.UI.TemplateControl" />
<altmember cref="T:System.Web.UI.LiteralControl" />
<altmember cref="T:System.Web.UI.WebControls.WebControl" />
<related type="Article" href="http://msdn.microsoft.com/library/fbe26c16-cff4-4089-b3dd-877411f0c0ef">Developing Custom ASP.NET Server Controls</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Control ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; Control();" />
<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>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Web.UI.Control" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Adapter">
<MemberSignature Language="C#" Value="protected System.Web.UI.Adapters.ControlAdapter Adapter { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.Adapters.ControlAdapter Adapter" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.Adapter" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property Adapter As ControlAdapter" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property System::Web::UI::Adapters::ControlAdapter ^ Adapter { System::Web::UI::Adapters::ControlAdapter ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Adapter : System.Web.UI.Adapters.ControlAdapter" Usage="System.Web.UI.Control.Adapter" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Web.UI.Adapters.ControlAdapter</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the browser-specific adapter for the control.</summary>
<value>A <see cref="T:System.Web.UI.Adapters.ControlAdapter" /> for this control. If the target browser does not require an adapter, returns <see langword="null" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
ASP.NET Web pages are usable across a wide range of devices and browsers that can request information from the Web. The <xref:System.Web.UI.Control.Adapter%2A> property returns the <xref:System.Web.UI.Adapters.ControlAdapter> object that renders the control on the requesting device or browser's screen.
For more information about adapters, see [Architectural Overview of Adaptive Control Behavior](https://msdn.microsoft.com/library/4ff05ae9-4109-4352-929e-ad893895dbff(v=vs.100)).
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.RenderControl(System.Web.UI.HtmlTextWriter,System.Web.UI.Adapters.ControlAdapter)" />
<altmember cref="T:System.Web.UI.Adapters.ControlAdapter" />
<related type="Article" href="https://msdn.microsoft.com/library/4ff05ae9-4109-4352-929e-ad893895dbff(v=vs.100)">Architectural Overview of Adaptive Control Behavior</related>
</Docs>
</Member>
<Member MemberName="AddedControl">
<MemberSignature Language="C#" Value="protected internal virtual void AddedControl (System.Web.UI.Control control, int index);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance void AddedControl(class System.Web.UI.Control control, int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.AddedControl(System.Web.UI.Control,System.Int32)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual void AddedControl(System::Web::UI::Control ^ control, int index);" />
<MemberSignature Language="F#" Value="abstract member AddedControl : System.Web.UI.Control * int -&gt; unit&#xA;override this.AddedControl : System.Web.UI.Control * int -&gt; unit" Usage="control.AddedControl (control, index)" />
<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="control" Type="System.Web.UI.Control" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="control">The <see cref="T:System.Web.UI.Control" /> that has been added.</param>
<param name="index">The index of the control in the <see cref="P:System.Web.UI.Control.Controls" /> collection.</param>
<summary>Called after a child control is added to the <see cref="P:System.Web.UI.Control.Controls" /> collection of the <see cref="T:System.Web.UI.Control" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.AddedControl%2A> method is called immediately after a control is added to the <xref:System.Web.UI.Control.Controls%2A> collection.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<paramref name="control" /> is a <see cref="T:System.Web.UI.WebControls.Substitution" /> control.</exception>
<altmember cref="P:System.Web.UI.Control.Controls" />
<altmember cref="M:System.Web.UI.Control.RemovedControl(System.Web.UI.Control)" />
</Docs>
</Member>
<Member MemberName="AddParsedSubObject">
<MemberSignature Language="C#" Value="protected virtual void AddParsedSubObject (object obj);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void AddParsedSubObject(object obj) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.AddParsedSubObject(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub AddParsedSubObject (obj As Object)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void AddParsedSubObject(System::Object ^ obj);" />
<MemberSignature Language="F#" Value="abstract member AddParsedSubObject : obj -&gt; unit&#xA;override this.AddParsedSubObject : obj -&gt; unit" Usage="control.AddParsedSubObject obj" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IParserAccessor.AddParsedSubObject(System.Object)</InterfaceMember>
</Implements>
<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;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">An <see cref="T:System.Object" /> that represents the parsed element.</param>
<summary>Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's <see cref="T:System.Web.UI.ControlCollection" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Unless you override it, this method automatically adds <xref:System.Web.UI.LiteralControl> objects to the server control's <xref:System.Web.UI.ControlCollection> object. This collection is accessible through <xref:System.Web.UI.Control.Controls%2A?displayProperty=nameWithType> property.
## Examples
The following example is a custom server control that uses the <xref:System.Web.UI.Control.AddParsedSubObject%2A> method to determine if elements declared between the opening and closing tags of this control are <xref:System.Web.UI.WebControls.TextBox> Web server controls. If they are, they are added to an <xref:System.Collections.ArrayList> object, `items`. When the overridden <xref:System.Web.UI.Control.CreateChildControls%2A> method is called, it iterates through the <xref:System.Collections.ArrayList> and adds each object in it to the <xref:System.Web.UI.ControlCollection> of the custom server control.
> [!IMPORTANT]
> This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](http://msdn.microsoft.com/library/772c7312-211a-4eb3-8d6e-eec0aa1dcc07).
[!code-csharp[Control_AddParsedSubObject#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_AddParsedSubObject/CS/control_addparsedsubobject.cs#1)]
[!code-vb[Control_AddParsedSubObject#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_AddParsedSubObject/VB/control_addparsedsubobject.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.ControlCollection" />
</Docs>
</Member>
<Member MemberName="ApplyStyleSheetSkin">
<MemberSignature Language="C#" Value="public virtual void ApplyStyleSheetSkin (System.Web.UI.Page page);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ApplyStyleSheetSkin(class System.Web.UI.Page page) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.ApplyStyleSheetSkin(System.Web.UI.Page)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void ApplyStyleSheetSkin(System::Web::UI::Page ^ page);" />
<MemberSignature Language="F#" Value="abstract member ApplyStyleSheetSkin : System.Web.UI.Page -&gt; unit&#xA;override this.ApplyStyleSheetSkin : System.Web.UI.Page -&gt; unit" Usage="control.ApplyStyleSheetSkin page" />
<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;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">
<AttributeName>System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="page" Type="System.Web.UI.Page" />
</Parameters>
<Docs>
<param name="page">The <see cref="T:System.Web.UI.Page" /> containing the control.</param>
<summary>Applies the style properties defined in the page style sheet to the control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.ApplyStyleSheetSkin%2A> method sets style properties on the control based on skin properties defined in a theme directory. The skin applied is either the default skin for the control or the skin specified in the <xref:System.Web.UI.Control.SkinID%2A> property. The <xref:System.Web.UI.Control.ApplyStyleSheetSkin%2A> method is called by ASP.NET for declarative controls placed on a page. You must call the <xref:System.Web.UI.Control.ApplyStyleSheetSkin%2A> method on any controls created programmatically at run time for style sheet skins to apply to the control. Theme skins are applied automatically. For more information on the difference between themes and cascading style sheets, see [ASP.NET Themes and Skins](http://msdn.microsoft.com/library/5df3ebbd-d46c-4502-9406-02f9df4ef2c3).
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The style sheet is already applied.</exception>
</Docs>
</Member>
<Member MemberName="AppRelativeTemplateSourceDirectory">
<MemberSignature Language="C#" Value="public string AppRelativeTemplateSourceDirectory { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AppRelativeTemplateSourceDirectory" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.AppRelativeTemplateSourceDirectory" />
<MemberSignature Language="VB.NET" Value="Public Property AppRelativeTemplateSourceDirectory As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ AppRelativeTemplateSourceDirectory { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.AppRelativeTemplateSourceDirectory : string with get, set" Usage="System.Web.UI.Control.AppRelativeTemplateSourceDirectory" />
<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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>set: System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>set: System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the application-relative virtual directory of the <see cref="T:System.Web.UI.Page" /> or <see cref="T:System.Web.UI.UserControl" /> object that contains this control.</summary>
<value>The application-relative virtual directory of the page or user control that contains this control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.AppRelativeTemplateSourceDirectory%2A> property contains the application-relative path to the page or user control that contains the current control. For example, if the Web page resides at http://www.contoso.com/application/subdirectory, the <xref:System.Web.UI.Control.AppRelativeTemplateSourceDirectory%2A> property returns "~/subdirectory".
To return the virtual path ("application/subdirectory"), use the <xref:System.Web.UI.Control.TemplateSourceDirectory%2A> property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="BeginRenderTracing">
<MemberSignature Language="C#" Value="protected void BeginRenderTracing (System.IO.TextWriter writer, object traceObject);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void BeginRenderTracing(class System.IO.TextWriter writer, object traceObject) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.BeginRenderTracing(System.IO.TextWriter,System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Sub BeginRenderTracing (writer As TextWriter, traceObject As Object)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void BeginRenderTracing(System::IO::TextWriter ^ writer, System::Object ^ traceObject);" />
<MemberSignature Language="F#" Value="member this.BeginRenderTracing : System.IO.TextWriter * obj -&gt; unit" Usage="control.BeginRenderTracing (writer, traceObject)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.IO.TextWriter" />
<Parameter Name="traceObject" Type="System.Object" />
</Parameters>
<Docs>
<param name="writer">The object that writes trace data.</param>
<param name="traceObject">The trace object.</param>
<summary>Begins design-time tracing of rendering data.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="BindingContainer">
<MemberSignature Language="C#" Value="public System.Web.UI.Control BindingContainer { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.Control BindingContainer" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.BindingContainer" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property BindingContainer As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::Control ^ BindingContainer { System::Web::UI::Control ^ get(); };" />
<MemberSignature Language="F#" Value="member this.BindingContainer : System.Web.UI.Control" Usage="System.Web.UI.Control.BindingContainer" />
<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">
<AttributeName>System.ComponentModel.Bindable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the control that contains this control's data binding.</summary>
<value>The <see cref="T:System.Web.UI.Control" /> that contains this control's data binding.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.BindingContainer%2A> property contains a reference to the <xref:System.Web.UI.Control> object that contains the data-binding information for the current control.
The <xref:System.Web.UI.Control.BindingContainer%2A> property is the same as the <xref:System.Web.UI.Control.NamingContainer%2A> property, except when the control is part of a template. In that case, the <xref:System.Web.UI.Control.BindingContainer%2A> property is set to the <xref:System.Web.UI.Control> that defines the template.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.NamingContainer" />
</Docs>
</Member>
<Member MemberName="BuildProfileTree">
<MemberSignature Language="C#" Value="protected void BuildProfileTree (string parentId, bool calcViewState);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void BuildProfileTree(string parentId, bool calcViewState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.BuildProfileTree(System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Sub BuildProfileTree (parentId As String, calcViewState As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void BuildProfileTree(System::String ^ parentId, bool calcViewState);" />
<MemberSignature Language="F#" Value="member this.BuildProfileTree : string * bool -&gt; unit" Usage="control.BuildProfileTree (parentId, calcViewState)" />
<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="parentId" Type="System.String" />
<Parameter Name="calcViewState" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="parentId">The identifier of the control's parent.</param>
<param name="calcViewState">A Boolean that indicates whether the view-state size is calculated.</param>
<summary>Gathers information about the server control and delivers it to the <see cref="P:System.Web.UI.Page.Trace" /> property to be displayed when tracing is enabled for the page.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property gathers the information necessary about a page's UI hierarchy and passes it to the page's [&lt;trace&gt;](~/docs/framework/configure-apps/file-schema/trace-debug/trace-element.md) property. When you enable tracing, either for a page or for your application, this information is displayed in the `Control Tree` section of the trace output. Trace output for a page is appended to the end of the page; while trace output for an application can be viewed from the trace viewer (trace.axd file) which is stored in the application's root directory. For more information about tracing, see [ASP.NET Tracing Overview](http://msdn.microsoft.com/library/1552561d-887c-4002-8770-f92662cdf416).
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ChildControlsCreated">
<MemberSignature Language="C#" Value="protected bool ChildControlsCreated { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool ChildControlsCreated" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.ChildControlsCreated" />
<MemberSignature Language="VB.NET" Value="Protected Property ChildControlsCreated As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property bool ChildControlsCreated { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.ChildControlsCreated : bool with get, set" Usage="System.Web.UI.Control.ChildControlsCreated" />
<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>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the server control's child controls have been created.</summary>
<value>
<see langword="true" /> if child controls have been created; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example demonstrates an override of the <xref:System.Web.UI.Control.OnDataBinding%2A> method of a custom <xref:System.Web.UI.WebControls.Repeater> control. To ensure that child controls are not created until data binding occurs again, the <xref:System.Web.UI.Control.ChildControlsCreated%2A> property is set to `true` after the <xref:System.Web.UI.WebControls.RepeaterItem> objects are created and added to the control's <xref:System.Web.UI.ControlCollection> object.
[!code-csharp[TemplatedDataBoundControl3#1](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl3/cs/customrepeater.cs#1)]
[!code-vb[TemplatedDataBoundControl3#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl3/vb/customrepeater.vb#1)]
The following example demonstrates how to use the custom repeater control in a Web page.
[!code-aspx-csharp[TemplatedDataBoundControl3#2](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl3/cs/default.aspx#2)]
[!code-aspx-vb[TemplatedDataBoundControl3#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl3/vb/default.aspx#2)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.CreateChildControls" />
</Docs>
</Member>
<Member MemberName="ClearCachedClientID">
<MemberSignature Language="C#" Value="protected void ClearCachedClientID ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void ClearCachedClientID() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.ClearCachedClientID" />
<MemberSignature Language="VB.NET" Value="Protected Sub ClearCachedClientID ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void ClearCachedClientID();" />
<MemberSignature Language="F#" Value="member this.ClearCachedClientID : unit -&gt; unit" Usage="control.ClearCachedClientID " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Sets the cached <see cref="P:System.Web.UI.Control.ClientID" /> value to <see langword="null" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ClearChildControlState">
<MemberSignature Language="C#" Value="protected void ClearChildControlState ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void ClearChildControlState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.ClearChildControlState" />
<MemberSignature Language="VB.NET" Value="Protected Sub ClearChildControlState ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void ClearChildControlState();" />
<MemberSignature Language="F#" Value="member this.ClearChildControlState : unit -&gt; unit" Usage="control.ClearChildControlState " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Deletes the control-state information for the server control's child controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.ClearChildControlState%2A> method is used when child control-state information written to the parent control's control state is overridden as new child controls are created, such as when data-binding child controls in a templated data-bound server control. Calling the <xref:System.Web.UI.Control.ClearChildControlState%2A> method to empty child controls before calling the <xref:System.Web.UI.Control.SaveControlState%2A> method reduces the size of the control-state information that must be stored or transmitted.
When recreating child controls of a <xref:System.Web.UI.Control> object, use the <xref:System.Web.UI.Control.ClearChildControlState%2A> method to clear child control state so that it does not get applied to the new controls inadvertently.
To clear both the child control state and view state, use the <xref:System.Web.UI.Control.ClearChildState%2A> method.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.ClearChildState" />
<altmember cref="M:System.Web.UI.Control.ClearChildViewState" />
</Docs>
</Member>
<Member MemberName="ClearChildState">
<MemberSignature Language="C#" Value="protected void ClearChildState ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void ClearChildState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.ClearChildState" />
<MemberSignature Language="VB.NET" Value="Protected Sub ClearChildState ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void ClearChildState();" />
<MemberSignature Language="F#" Value="member this.ClearChildState : unit -&gt; unit" Usage="control.ClearChildState " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Deletes the view-state and control-state information for all the server control's child controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.ClearChildState%2A> method clears all view-state and control-state information for child controls. It is equivalent to calling both the <xref:System.Web.UI.Control.ClearChildViewState%2A> method and the <xref:System.Web.UI.Control.ClearChildControlState%2A> method.
When recreating child controls of a <xref:System.Web.UI.Control> object, use the <xref:System.Web.UI.Control.ClearChildState%2A> method to clear child state so that it does not get applied to the new controls inadvertently.
## Examples
The following code example demonstrates how to override the <xref:System.Web.UI.Control.OnDataBinding%2A> method for a templated data-bound control. If the data source that the control binds to is populated, the control's <xref:System.Web.UI.ControlCollection> collection is emptied using the <xref:System.Web.UI.ControlCollection.Clear%2A> method, and the <xref:System.Web.UI.Control.ClearChildState%2A> method is used to remove any state information that had been saved for the child controls.
[!code-csharp[TemplatedDataBoundControl2#3](~/samples/snippets/csharp/VS_Snippets_WebNet/TemplatedDataBoundControl2/cs/templatedataboundcontrol.cs#3)]
[!code-vb[TemplatedDataBoundControl2#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/TemplatedDataBoundControl2/vb/templatedataboundcontrol.vb#3)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.ClearChildControlState" />
<altmember cref="M:System.Web.UI.Control.ClearChildViewState" />
</Docs>
</Member>
<Member MemberName="ClearChildViewState">
<MemberSignature Language="C#" Value="protected void ClearChildViewState ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void ClearChildViewState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.ClearChildViewState" />
<MemberSignature Language="VB.NET" Value="Protected Sub ClearChildViewState ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void ClearChildViewState();" />
<MemberSignature Language="F#" Value="member this.ClearChildViewState : unit -&gt; unit" Usage="control.ClearChildViewState " />
<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>Deletes the view-state information for all the server control's child controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is commonly used when you override the <xref:System.Web.UI.Control.DataBind%2A> method when developing templated data-bound server controls. If you do not call this method, child control view–state information can be written to a parent server control, only to be overridden when the data is bound.
When recreating child controls of a <xref:System.Web.UI.Control>, use the <xref:System.Web.UI.Control.ClearChildViewState%2A> method to clear child view state so that it does not get applied to the new controls inadvertently.
For more information about using this method, see [How to: Create Templated ASP.NET User Controls](http://msdn.microsoft.com/library/07664410-02dd-4494-af53-a9259741d4f2).
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
<altmember cref="M:System.Web.UI.Control.DataBind" />
<altmember cref="M:System.Web.UI.Control.ClearChildControlState" />
<altmember cref="M:System.Web.UI.Control.ClearChildState" />
<related type="Article" href="http://msdn.microsoft.com/library/07664410-02dd-4494-af53-a9259741d4f2">How to: Create Templated User Controls</related>
</Docs>
</Member>
<Member MemberName="ClearEffectiveClientIDMode">
<MemberSignature Language="C#" Value="protected void ClearEffectiveClientIDMode ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void ClearEffectiveClientIDMode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.ClearEffectiveClientIDMode" />
<MemberSignature Language="VB.NET" Value="Protected Sub ClearEffectiveClientIDMode ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void ClearEffectiveClientIDMode();" />
<MemberSignature Language="F#" Value="member this.ClearEffectiveClientIDMode : unit -&gt; unit" Usage="control.ClearEffectiveClientIDMode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Sets the <see cref="P:System.Web.UI.Control.ClientIDMode" /> property of the current control instance and of any child controls to <see cref="F:System.Web.UI.ClientIDMode.Inherit" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ClientID">
<MemberSignature Language="C#" Value="public virtual string ClientID { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ClientID" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.ClientID" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property ClientID As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ ClientID { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ClientID : string" Usage="System.Web.UI.Control.ClientID" />
<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-1.1;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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the control ID for HTML markup that is generated by ASP.NET.</summary>
<value>The control ID for HTML markup that is generated by ASP.NET.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When a Web server control is rendered as an HTML element, the `id` attribute of the HTML element is set to the value of the <xref:System.Web.UI.Control.ClientID%2A> property. The <xref:System.Web.UI.Control.ClientID%2A> value is often used to access the HTML element in client script by using the `document.getElementById` method. The ID is also often used in CSS rules to specify elements to style. For example, the following CSS style rule selects all `span` elements that have the `id` attribute value of `ProductIDLabel` and sets their `background-color` attribute to `white`:
```
span#ProductIDLabel { background-color: white; }
```
ASP.NET provides multiple algorithms for how to generate the <xref:System.Web.UI.Control.ClientID%2A> property value. You select which algorithm to use for a control by setting its <xref:System.Web.UI.Control.ClientIDMode%2A> property. The algorithms are identified by the <xref:System.Web.UI.ClientIDMode> enumeration values that are listed in the following table.
|Value|Description|
|-----------|-----------------|
|<xref:System.Web.UI.ClientIDMode.AutoID>|The <xref:System.Web.UI.Control.ClientID%2A> value is generated by concatenating the <xref:System.Web.UI.Control.ID%2A> values of each parent naming container with the <xref:System.Web.UI.Control.ID%2A> value of the control. In data-binding scenarios where multiple instances of a control are rendered, an incrementing value is inserted in front of the control's <xref:System.Web.UI.Control.ID%2A> value. Each segment is separated by an underscore character (_). This algorithm was used in versions of ASP.NET earlier than ASP.NET 4.|
|<xref:System.Web.UI.ClientIDMode.Static>|The <xref:System.Web.UI.Control.ClientID%2A> value is set to the value of the <xref:System.Web.UI.Control.ID%2A> property. If the control is a naming container, the control is used as the top of the hierarchy of naming containers for any controls that it contains.|
|<xref:System.Web.UI.ClientIDMode.Predictable>|This algorithm is used for controls that are in data-bound controls. The <xref:System.Web.UI.Control.ClientID%2A> value is generated by concatenating the <xref:System.Web.UI.Control.ClientID%2A> value of the parent naming container with the <xref:System.Web.UI.Control.ID%2A> value of the control. If the control is a data-bound control that generates multiple rows, the value of the data field specified in the <xref:System.Web.UI.WebControls.IDataBoundListControl.ClientIDRowSuffix%2A> property is added at the end. For the <xref:System.Web.UI.WebControls.GridView> control, multiple data fields can be specified. If the <xref:System.Web.UI.WebControls.IDataBoundListControl.ClientIDRowSuffix%2A> property is blank, a sequential number is added at the end instead of a data-field value. Each segment is separated by an underscore character (_).|
|<xref:System.Web.UI.ClientIDMode.Inherit>|The control inherits the <xref:System.Web.UI.ClientIDMode> setting of its <xref:System.Web.UI.Control.NamingContainer%2A> control.|
The default value of <xref:System.Web.UI.Control.ClientIDMode%2A> for a page is <xref:System.Web.UI.ClientIDMode.Predictable>. The default value of <xref:System.Web.UI.Control.ClientIDMode%2A> for a control is <xref:System.Web.UI.ClientIDMode.Inherit>. Because the default for controls is <xref:System.Web.UI.ClientIDMode.Inherit>, the default generation mode is <xref:System.Web.UI.ClientIDMode.Predictable>. (However, if you use Visual Studio to convert a Web project to ASP.NET 4 from an earlier version, Visual Studio automatically sets the site default to <xref:System.Web.UI.ClientIDMode.AutoID> in the Web.config file.)
For more information, see [ASP.NET Web Server Control Identification](http://msdn.microsoft.com/library/45a8c3ef-5ac7-48f1-862a-0cd5073742e7).
## Examples
The following examples show a Web user control that is inside a content page for a master page. The user control contains a <xref:System.Web.UI.WebControls.DropDownList> control and a <xref:System.Web.UI.WebControls.Label> control. The text that is displayed in the <xref:System.Web.UI.WebControls.Label> control is determined by the value that the user selects from the <xref:System.Web.UI.WebControls.DropDownList> control. The text value is set through client script so that the Web page does not have to post back to the server in order to set this value. To get a reference to the HTML element that is rendered for the <xref:System.Web.UI.WebControls.Label> control in client script, you must know the value of the control's <xref:System.Web.UI.Control.ClientID%2A> property. However, because the user control can be put anywhere in a Web page, it is impossible to know in advance which naming containers will contain the controls. To make sure that the <xref:System.Web.UI.Control.ClientID%2A> value will be the same as the <xref:System.Web.UI.Control.ID%2A> value, the code sets the <xref:System.Web.UI.Control.ClientIDMode%2A> value to <xref:System.Web.UI.WebControls.ValidatorDisplay.Static>.
The following example shows the user control.
The following example shows the content page that contains the user control.
The following example shows the master page that contains the content page.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.NamingContainer" />
<altmember cref="P:System.Web.UI.Control.ID" />
<altmember cref="T:System.Web.UI.INamingContainer" />
<related type="Article" href="http://msdn.microsoft.com/library/45a8c3ef-5ac7-48f1-862a-0cd5073742e7">ASP.NET Control Identification</related>
<related type="Article" href="http://msdn.microsoft.com/library/fb58ed73-d8f7-401c-9560-d99dd9ca7db8">How to: Access Controls from JavaScript by ID</related>
<related type="Article" href="http://msdn.microsoft.com/library/776f3747-7fa7-4851-ae27-f728ede1a564">Walkthrough: Making Data-Bound Controls Easier to Access from JavaScript</related>
<related type="Article" href="http://msdn.microsoft.com/library/f0eaf202-61b6-4cd8-9604-6b7638fdf0ae">Walkthrough: Making Controls Located in Web User Controls Easier to Access From JavaScript</related>
<related type="Article" href="http://msdn.microsoft.com/library/13edb6b9-2dea-43c6-b8c1-a47207de19aa">Client Script in ASP.NET Web Pages</related>
</Docs>
</Member>
<Member MemberName="ClientIDMode">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.ClientIDMode ClientIDMode { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Web.UI.ClientIDMode ClientIDMode" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.ClientIDMode" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ClientIDMode As ClientIDMode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Web::UI::ClientIDMode ClientIDMode { System::Web::UI::ClientIDMode get(); void set(System::Web::UI::ClientIDMode value); };" />
<MemberSignature Language="F#" Value="member this.ClientIDMode : System.Web.UI.ClientIDMode with get, set" Usage="System.Web.UI.Control.ClientIDMode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DefaultValue(Mono.Cecil.CustomAttributeArgument)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.ClientIDMode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the algorithm that is used to generate the value of the <see cref="P:System.Web.UI.Control.ClientID" /> property.</summary>
<value>A value that indicates how the <see cref="P:System.Web.UI.Control.ClientID" /> property is generated. The default is <see cref="F:System.Web.UI.ClientIDMode.Inherit" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
ASP.NET provides multiple algorithms for how to generate the <xref:System.Web.UI.Control.ClientID%2A> property value. You select which algorithm to use for a control by setting its <xref:System.Web.UI.Control.ClientIDMode%2A> property. The algorithms are identified by the <xref:System.Web.UI.ClientIDMode> enumeration values that are listed in the following table.
|Value|Description|
|-----------|-----------------|
|<xref:System.Web.UI.ClientIDMode.AutoID>|The <xref:System.Web.UI.Control.ClientID%2A> value is generated by concatenating the <xref:System.Web.UI.Control.ID%2A> values of each parent naming container with the <xref:System.Web.UI.Control.ID%2A> value of the control. In data-binding scenarios where multiple instances of a control are rendered, an incrementing value is inserted in front of the control's <xref:System.Web.UI.Control.ID%2A> value. Each segment is separated by an underscore character (_). This algorithm was used in versions of ASP.NET earlier than ASP.NET 4.|
|<xref:System.Web.UI.ClientIDMode.Static>|The <xref:System.Web.UI.Control.ClientID%2A> value is set to the value of the <xref:System.Web.UI.Control.ID%2A> property. If the control is a naming container, the control is used as the top of the hierarchy of naming containers for any controls that it contains.|
|<xref:System.Web.UI.ClientIDMode.Predictable>|This algorithm is used for controls that are in data-bound controls. The <xref:System.Web.UI.Control.ClientID%2A> value is generated by concatenating the <xref:System.Web.UI.Control.ClientID%2A> value of the parent naming container with the <xref:System.Web.UI.Control.ID%2A> value of the control. If the control is a data-bound control that generates multiple rows, the value of the data field specified in the <xref:System.Web.UI.WebControls.IDataBoundListControl.ClientIDRowSuffix%2A> property is added at the end. For the <xref:System.Web.UI.WebControls.GridView> control, multiple data fields can be specified. If the <xref:System.Web.UI.WebControls.IDataBoundListControl.ClientIDRowSuffix%2A> property is blank, a sequential number is added at the end instead of a data-field value. This number begins at zero and is incremented by 1 for each row. Each segment is separated by an underscore character (_).|
|<xref:System.Web.UI.ClientIDMode.Inherit>|The control inherits the <xref:System.Web.UI.ClientIDMode> setting of its <xref:System.Web.UI.Control.NamingContainer%2A> control.|
The default value of <xref:System.Web.UI.Control.ClientIDMode%2A> for a page is <xref:System.Web.UI.ClientIDMode.Predictable>. The default value of <xref:System.Web.UI.Control.ClientIDMode%2A> for a control is <xref:System.Web.UI.ClientIDMode.Inherit>. Because the default for controls is <xref:System.Web.UI.ClientIDMode.Inherit>, the default generation mode is <xref:System.Web.UI.ClientIDMode.Predictable>. (However, if you use Visual Studio to convert a Web project to ASP.NET 4 from an earlier version, Visual Studio automatically sets the site default to <xref:System.Web.UI.ClientIDMode.AutoID> in the Web.config file.)
For more information, see [ASP.NET Web Server Control Identification](http://msdn.microsoft.com/library/45a8c3ef-5ac7-48f1-862a-0cd5073742e7).
## Examples
The following example shows <xref:System.Web.UI.WebControls.Label> controls that are contained in a <xref:System.Web.UI.WebControls.ListView> control. On the <xref:System.Web.UI.WebControls.ListView> control, the <xref:System.Web.UI.Control.ClientIDMode%2A> property is set to <xref:System.Web.UI.ClientIDMode.Predictable> and the <xref:System.Web.UI.WebControls.ListView.ClientIDRowSuffix%2A> property is set to `ProductID`. In the rendered HTML, this creates three `span` elements that correspond to three `ProductIDLabel` controls. When the page runs, the `id` attributes for the `span` elements are set to the following values:
- `ListView1_ProductIDLabel_1`
- `ListView1_ProductIDLabel_34`
- `ListView1_ProductIDLabel_43`
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/45a8c3ef-5ac7-48f1-862a-0cd5073742e7">ASP.NET Control Identification</related>
<related type="Article" href="http://msdn.microsoft.com/library/fb58ed73-d8f7-401c-9560-d99dd9ca7db8">How to: Access Controls from JavaScript by ID</related>
<related type="Article" href="http://msdn.microsoft.com/library/776f3747-7fa7-4851-ae27-f728ede1a564">Walkthrough: Making Data-Bound Controls Easier to Access from JavaScript</related>
<related type="Article" href="http://msdn.microsoft.com/library/f0eaf202-61b6-4cd8-9604-6b7638fdf0ae">Walkthrough: Making Controls Located in Web User Controls Easier to Access From JavaScript</related>
</Docs>
</Member>
<Member MemberName="ClientIDSeparator">
<MemberSignature Language="C#" Value="protected char ClientIDSeparator { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance char ClientIDSeparator" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.ClientIDSeparator" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property ClientIDSeparator As Char" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property char ClientIDSeparator { char get(); };" />
<MemberSignature Language="F#" Value="member this.ClientIDSeparator : char" Usage="System.Web.UI.Control.ClientIDSeparator" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Char</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a character value representing the separator character used in the <see cref="P:System.Web.UI.Control.ClientID" /> property.</summary>
<value>Always returns the underscore character (_).</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.ClientID%2A> value is generated by concatenating the <xref:System.Web.UI.Control.ID%2A> value of the control and the <xref:System.Web.UI.Control.UniqueID%2A> value of its parent control. Each part of the generated <xref:System.Web.UI.Control.ID%2A> property is separated by the <xref:System.Web.UI.Control.ClientIDSeparator%2A> property value. The value always returns an underscore (_).
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ID" />
<altmember cref="P:System.Web.UI.Control.ClientID" />
<altmember cref="P:System.Web.UI.Control.UniqueID" />
<altmember cref="P:System.Web.UI.Control.IdSeparator" />
</Docs>
</Member>
<Member MemberName="Context">
<MemberSignature Language="C#" Value="protected internal virtual System.Web.HttpContext Context { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.HttpContext Context" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.Context" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable ReadOnly Property Context As HttpContext" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual property System::Web::HttpContext ^ Context { System::Web::HttpContext ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Context : System.Web.HttpContext" Usage="System.Web.UI.Control.Context" />
<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-1.1;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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.HttpContext</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Web.HttpContext" /> object associated with the server control for the current Web request.</summary>
<value>The specified <see cref="T:System.Web.HttpContext" /> object associated with the current request.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property gives you access to the <xref:System.Web.HttpContext> object for the current Web request. The object provides properties that access the <xref:System.Web.HttpContext.Application%2A>, <xref:System.Web.HttpContext.Session%2A>, <xref:System.Web.HttpContext.Request%2A>, <xref:System.Web.HttpContext.Response%2A> and other objects that contain information about the current HTTP request. It also provides methods that allow you to obtain configuration information and set or clear errors for the request.
## Examples
[!code-csharp[System.Web.UI.Control_Context_OnInit_ResolveUrl#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/CS/control1.cs#1)]
[!code-vb[System.Web.UI.Control_Context_OnInit_ResolveUrl#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Context_OnInit_ResolveUrl/VB/control1.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.HttpContext" />
<altmember cref="T:System.Web.HttpApplication" />
<altmember cref="T:System.Web.HttpServerUtility" />
<altmember cref="T:System.Web.HttpRequest" />
<altmember cref="T:System.Web.HttpResponse" />
</Docs>
</Member>
<Member MemberName="Controls">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.ControlCollection Controls { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.ControlCollection Controls" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.Controls" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Controls As ControlCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Web::UI::ControlCollection ^ Controls { System::Web::UI::ControlCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Controls : System.Web.UI.ControlCollection" Usage="System.Web.UI.Control.Controls" />
<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-1.1;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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.ControlCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Web.UI.ControlCollection" /> object that represents the child controls for a specified server control in the UI hierarchy.</summary>
<value>The collection of child controls for the specified server control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
On an ASP.NET page, when controls are added declaratively between the opening and closing tags of a server control, ASP.NET automatically adds the controls to the containing server control's <xref:System.Web.UI.ControlCollection>. Any HTML tags or text strings that are not processed on the server are treated as <xref:System.Web.UI.LiteralControl> objects. These are added to the collection like other server controls.
The <xref:System.Web.UI.Control.Controls%2A> property allows you programmatic access to the instance of the <xref:System.Web.UI.ControlCollection> class for any server control. You can add controls to the collection, remove controls from the collection, or iterate through the server controls in the collection.
## Examples
The following example demonstrates how to add child controls to a server control's <xref:System.Web.UI.ControlCollection> object through its <xref:System.Web.UI.Control.Controls%2A> property.
[!code-csharp[Classic Control.Controls Example#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Control.Controls Example/CS/source.cs#1)]
[!code-vb[Classic Control.Controls Example#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.Controls Example/VB/source.vb#1)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When overriding the <see cref="P:System.Web.UI.Control.Controls" /> property, be sure to call the <see cref="M:System.Web.UI.Control.EnsureChildControls" /> method. Furthermore, if you are planning to add controls to the controls collection programmatically, consider adding the controls in an overridden <see cref="M:System.Web.UI.Control.CreateChildControls" /> method.</para>
</block>
<altmember cref="T:System.Web.UI.ControlCollection" />
<altmember cref="M:System.Web.UI.Control.CreateControlCollection" />
<altmember cref="M:System.Web.UI.Control.CreateChildControls" />
</Docs>
</Member>
<Member MemberName="CreateChildControls">
<MemberSignature Language="C#" Value="protected internal virtual void CreateChildControls ();" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance void CreateChildControls() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.CreateChildControls" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Sub CreateChildControls ()" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual void CreateChildControls();" />
<MemberSignature Language="F#" Value="abstract member CreateChildControls : unit -&gt; unit&#xA;override this.CreateChildControls : unit -&gt; unit" Usage="control.CreateChildControls " />
<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;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When you develop a composite or templated server control, you must override this method. Controls that override the <xref:System.Web.UI.Control.CreateChildControls%2A> method should implement the <xref:System.Web.UI.INamingContainer> interface to avoid naming conflicts.
For more information, see [Web Server Controls Templates](http://msdn.microsoft.com/library/f769d290-fd04-4084-85fc-4ea30dd2e8ae) and [Developing Custom ASP.NET Server Controls](http://msdn.microsoft.com/library/fbe26c16-cff4-4089-b3dd-877411f0c0ef).
## Examples
The following example demonstrates an overridden version of the <xref:System.Web.UI.Control.CreateChildControls%2A> method. In this implementation, the composite control displays a <xref:System.Web.UI.WebControls.TextBox> control enclosed in two literal controls that render HTML.
> [!IMPORTANT]
> This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](http://msdn.microsoft.com/library/772c7312-211a-4eb3-8d6e-eec0aa1dcc07).
[!code-csharp[SystemWebUIControl CreateChildControls and EnsureChildControls#2](~/samples/snippets/csharp/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/CS/compositecontrolsample1.cs#2)]
[!code-vb[SystemWebUIControl CreateChildControls and EnsureChildControls#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/VB/compositecontrolsample1.vb#2)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.Controls" />
<altmember cref="T:System.Web.UI.ControlCollection" />
<altmember cref="P:System.Web.UI.Control.ChildControlsCreated" />
<altmember cref="T:System.Web.UI.INamingContainer" />
<related type="Article" href="http://msdn.microsoft.com/library/fbe26c16-cff4-4089-b3dd-877411f0c0ef">Developing Custom ASP.NET Server Controls</related>
<related type="Article" href="http://msdn.microsoft.com/library/f769d290-fd04-4084-85fc-4ea30dd2e8ae">ASP.NET Web Server Controls Templates</related>
</Docs>
</Member>
<Member MemberName="CreateControlCollection">
<MemberSignature Language="C#" Value="protected virtual System.Web.UI.ControlCollection CreateControlCollection ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.ControlCollection CreateControlCollection() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.CreateControlCollection" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function CreateControlCollection () As ControlCollection" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual System::Web::UI::ControlCollection ^ CreateControlCollection();" />
<MemberSignature Language="F#" Value="abstract member CreateControlCollection : unit -&gt; System.Web.UI.ControlCollection&#xA;override this.CreateControlCollection : unit -&gt; System.Web.UI.ControlCollection" Usage="control.CreateControlCollection " />
<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.ControlCollection</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates a new <see cref="T:System.Web.UI.ControlCollection" /> object to hold the child controls (both literal and server) of the server control.</summary>
<returns>A <see cref="T:System.Web.UI.ControlCollection" /> object to contain the current server control's child server controls.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Override this method in a custom server control if you have created a collection object that is derived from the <xref:System.Web.UI.ControlCollection> class. You can then instantiate that collection class in the override of this method.
## Examples
The following code example overrides the <xref:System.Web.UI.Control.CreateControlCollection%2A> method to create an instance of a `CustomControlCollection` class, which inherits from the <xref:System.Web.UI.ControlCollection> class.
[!code-csharp[System.Web.UI.ControlCollection_CTor_Owner#2](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/cs/controlcollection_7.cs#2)]
[!code-vb[System.Web.UI.ControlCollection_CTor_Owner#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.ControlCollection_CTor_Owner/VB/controlcollection_7.vb#2)]
The following code example uses the <xref:System.Web.UI.Control.CreateControlCollection%2A> method in a custom server control override of the <xref:System.Web.UI.Control.CreateChildControls%2A> method. The new collection is created, and then populated with two child controls, `firstControl` and `secondControl`.
[!code-csharp[Control_Sample_1#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_Sample_1/CS/control_sample.cs#1)]
[!code-vb[Control_Sample_1#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample_1/VB/control_sample.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.ControlCollection" />
</Docs>
</Member>
<MemberGroup MemberName="DataBind">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Binds a data source to the invoked server control and all its child controls.</summary>
</Docs>
</MemberGroup>
<Member MemberName="DataBind">
<MemberSignature Language="C#" Value="public virtual void DataBind ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void DataBind() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.DataBind" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub DataBind ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void DataBind();" />
<MemberSignature Language="F#" Value="abstract member DataBind : unit -&gt; unit&#xA;override this.DataBind : unit -&gt; unit" Usage="control.DataBind " />
<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.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Binds a data source to the invoked server control and all its child controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use this method to bind data from a source to a server control. This method is commonly used after retrieving a dataset through a database query. Most controls perform data binding automatically, which means that you typically do not need to call this method explicitly.
This method is commonly overridden when you create a custom templated data-bound control. For more information, see [How to: Create Templated ASP.NET User Controls](http://msdn.microsoft.com/library/07664410-02dd-4494-af53-a9259741d4f2) and [Developing Custom Data-Bound Web Server Controls](http://msdn.microsoft.com/library/88fe02a3-957f-4ff7-84f5-2d7ab78db4c1). When called on a server control, this method resolves all data-binding expressions in the server control and in any of its child controls.
## Examples
The following example overrides the <xref:System.Web.UI.Control.DataBind%2A> method in a custom ASP.NET server control. It begins by calling the base <xref:System.Web.UI.Control.OnDataBinding%2A> method and then uses the <xref:System.Web.UI.ControlCollection.Clear%2A?displayProperty=nameWithType> method to delete all the child controls and the <xref:System.Web.UI.Control.ClearChildViewState%2A> method to delete any saved view-state settings for those child controls. Finally, the <xref:System.Web.UI.Control.ChildControlsCreated%2A> property is set to `true` and the control is instructed to track any changes to the view state of the newly created controls with the <xref:System.Web.UI.Control.TrackViewState%2A> method. This is a common technique when binding data to a control to ensure that new data does not conflict with data stored from a previous <xref:System.Web.UI.Control.DataBind%2A> method call.
[!code-csharp[Control_StateManagement#6](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#6)]
[!code-vb[Control_StateManagement#6](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#6)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.OnDataBinding(System.EventArgs)" />
<altmember cref="E:System.Web.UI.Control.DataBinding" />
<altmember cref="M:System.Web.UI.Control.DataBindChildren" />
<related type="Article" href="http://msdn.microsoft.com/library/fbe26c16-cff4-4089-b3dd-877411f0c0ef">Developing Custom ASP.NET Server Controls</related>
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">ASP.NET Page Life Cycle Overview</related>
</Docs>
</Member>
<Member MemberName="DataBind">
<MemberSignature Language="C#" Value="protected virtual void DataBind (bool raiseOnDataBinding);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void DataBind(bool raiseOnDataBinding) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.DataBind(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub DataBind (raiseOnDataBinding As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void DataBind(bool raiseOnDataBinding);" />
<MemberSignature Language="F#" Value="abstract member DataBind : bool -&gt; unit&#xA;override this.DataBind : bool -&gt; unit" Usage="control.DataBind raiseOnDataBinding" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="raiseOnDataBinding" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="raiseOnDataBinding">
<see langword="true" /> if the <see cref="E:System.Web.UI.Control.DataBinding" /> event is raised; otherwise, <see langword="false" />.</param>
<summary>Binds a data source to the invoked server control and all its child controls with an option to raise the <see cref="E:System.Web.UI.Control.DataBinding" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.Control.DataBind%28System.Boolean%29?displayProperty=nameWithType> method in a scenario when your custom control overrides the <xref:System.Web.UI.Control.DataBind%2A> method and implements the <xref:System.Web.UI.IDataItemContainer> interface. In this scenario, the custom control calls the <xref:System.Web.UI.Control.DataBind%28System.Boolean%29?displayProperty=nameWithType> method with `raiseOnDataBinding` set to `false` to ensure that the base class's <xref:System.Web.UI.Control.DataBind%2A> method gets called.
The <xref:System.Web.UI.Control.DataBind?displayProperty=nameWithType> method invokes the <xref:System.Web.UI.Control.DataBind%28System.Boolean%29?displayProperty=nameWithType> method with `raiseOnDataBinding` set to `true`.
> [!NOTE]
> Calling the <xref:System.Web.UI.Control.DataBind%28System.Boolean%29?displayProperty=nameWithType> method with `raiseOnDataBinding` set to `false` causes any child controls to be data bound with the <xref:System.Web.UI.Control.DataBind?displayProperty=nameWithType> method.
]]></format>
</remarks>
<altmember cref="E:System.Web.UI.Control.DataBinding" />
<altmember cref="M:System.Web.UI.Control.DataBindChildren" />
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">ASP.NET Page Life Cycle Overview</related>
</Docs>
</Member>
<Member MemberName="DataBindChildren">
<MemberSignature Language="C#" Value="protected virtual void DataBindChildren ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void DataBindChildren() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.DataBindChildren" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub DataBindChildren ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void DataBindChildren();" />
<MemberSignature Language="F#" Value="abstract member DataBindChildren : unit -&gt; unit&#xA;override this.DataBindChildren : unit -&gt; unit" Usage="control.DataBindChildren " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Binds a data source to the server control's child controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.Control.DataBindChildren%2A> method to bind a data source to the child controls of a server control.
> [!NOTE]
> When called on a server control, this method does not bind data to the control. To bind a server control and all its child controls, call the <xref:System.Web.UI.Control.DataBind%2A> method.
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/fbe26c16-cff4-4089-b3dd-877411f0c0ef">Developing Custom ASP.NET Server Controls</related>
</Docs>
</Member>
<Member MemberName="DataBinding">
<MemberSignature Language="C#" Value="public event EventHandler DataBinding;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler DataBinding" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.Control.DataBinding" />
<MemberSignature Language="VB.NET" Value="Public Custom Event DataBinding As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ DataBinding;" />
<MemberSignature Language="F#" Value="member this.DataBinding : EventHandler " Usage="member this.DataBinding : 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 the server control binds to a data source.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This event notifies the server control to perform any data-binding logic that has been written for it.
## Examples
[!code-csharp[ITemplate_Interface#1](~/samples/snippets/csharp/VS_Snippets_WebNet/ITemplate_Interface/CS/itemplate.cs#1)]
[!code-vb[ITemplate_Interface#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/ITemplate_Interface/VB/itemplate.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.OnDataBinding(System.EventArgs)" />
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="DataItemContainer">
<MemberSignature Language="C#" Value="public System.Web.UI.Control DataItemContainer { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.Control DataItemContainer" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.DataItemContainer" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DataItemContainer As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::Control ^ DataItemContainer { System::Web::UI::Control ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DataItemContainer : System.Web.UI.Control" Usage="System.Web.UI.Control.DataItemContainer" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.Bindable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the naming container if the naming container implements <see cref="T:System.Web.UI.IDataItemContainer" />.</summary>
<value>The naming container. In a hierarchy of naming containers that implement <see cref="T:System.Web.UI.IDataItemContainer" />, this property returns the naming container at the top of the hierarchy, or <see langword="null" /> if the current <see cref="T:System.Web.UI.Control" /> object is not in a naming container that implements <see cref="T:System.Web.UI.IDataItemContainer" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DataKeysContainer">
<MemberSignature Language="C#" Value="public System.Web.UI.Control DataKeysContainer { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.Control DataKeysContainer" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.DataKeysContainer" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DataKeysContainer As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Web::UI::Control ^ DataKeysContainer { System::Web::UI::Control ^ get(); };" />
<MemberSignature Language="F#" Value="member this.DataKeysContainer : System.Web.UI.Control" Usage="System.Web.UI.Control.DataKeysContainer" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.Bindable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the naming container if the naming container implements <see cref="T:System.Web.UI.IDataKeysControl" />.</summary>
<value>The naming container. In a hierarchy of naming containers that implement <see cref="T:System.Web.UI.IDataKeysControl" />, the property returns the naming container at the top of the hierarchy, or <see langword="null" /> if the current <see cref="T:System.Web.UI.Control" /> object is not in a naming container that implements <see cref="T:System.Web.UI.IDataKeysControl" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DesignMode">
<MemberSignature Language="C#" Value="protected internal bool DesignMode { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool DesignMode" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.DesignMode" />
<MemberSignature Language="VB.NET" Value="Protected Friend ReadOnly Property DesignMode As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; property bool DesignMode { bool get(); };" />
<MemberSignature Language="F#" Value="member this.DesignMode : bool" Usage="System.Web.UI.Control.DesignMode" />
<MemberType>Property</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>
<Docs>
<summary>Gets a value indicating whether a control is being used on a design surface.</summary>
<value>
<see langword="true" /> if the control is being used in a designer; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.DesignMode%2A> property returns `true` to indicate that the control is being used in the context of a designer. Your custom controls can use this property when design-time behavior is different than run-time behavior.
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/1d5a99d7-0a72-403e-812e-2c1ab595c810">ASP.NET Control Designers Overview</related>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public virtual void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="control.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<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>Enables a server control to perform final clean up before it is released from memory.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Call <xref:System.Web.UI.Control.Dispose%2A> when you are finished using the <xref:System.Web.UI.Control>. The <xref:System.Web.UI.Control.Dispose%2A> method leaves the <xref:System.Web.UI.Control> in an unusable state. After calling this method, you must release all references to the control so the memory it was occupying can be reclaimed by garbage collection.
## Examples
The following code example overrides the <xref:System.Web.UI.Control.Dispose%2A> method to close the <xref:System.Web.UI.HtmlTextWriter> object associated with a control, and call the <xref:System.Web.UI.Control.Dispose%2A> method on a <xref:System.Web.UI.WebControls.Button> control, named `myButton`. If an <xref:System.Exception> is thrown when this version of the <xref:System.Web.UI.Control.Dispose%2A> method is called, the control writes a message to the current <xref:System.Web.HttpResponse> object.
[!code-csharp[Control_Dispose#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_Dispose/CS/control_disposemethod.cs#1)]
[!code-vb[Control_Dispose#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_Dispose/VB/control_disposemethod.vb#1)]
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="Disposed">
<MemberSignature Language="C#" Value="public event EventHandler Disposed;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Disposed" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.Control.Disposed" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Disposed As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual event EventHandler ^ Disposed;" />
<MemberSignature Language="F#" Value="member this.Disposed : EventHandler " Usage="member this.Disposed : 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 server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Resources that require significant processor time, such as database connections, should be released with this event.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.Dispose" />
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="EnableTheming">
<MemberSignature Language="C#" Value="public virtual bool EnableTheming { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnableTheming" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.EnableTheming" />
<MemberSignature Language="VB.NET" Value="Public Overridable 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.Control.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">
<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">
<AttributeName>System.ComponentModel.DefaultValue(true)</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">
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether themes apply to this control.</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.Control.EnableTheming%2A> property indicates whether themes are enabled for a specified control. When the <xref:System.Web.UI.Control.EnableTheming%2A> property is `true`, the application's theme directory is searched for control skins to apply. If no skin for the particular control exists in the theme directory, skins are not applied.
When the <xref:System.Web.UI.Control.EnableTheming%2A> property is `false`, the theme directory is not searched and the content of the <xref:System.Web.UI.Control.SkinID%2A> property is not used.
Themes can be enabled at the page, container, or control level. A control can override the <xref:System.Web.UI.Control.EnableTheming%2A> value set by its parent control, or by the containing page.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see langword="Page_PreInit" /> event has already occurred.
\- or -
The control has already been added to the <see langword="Controls" /> collection.</exception>
<altmember cref="P:System.Web.UI.Control.SkinID" />
<related type="Article" href="http://msdn.microsoft.com/library/5df3ebbd-d46c-4502-9406-02f9df4ef2c3">ASP.NET Themes Overview</related>
</Docs>
</Member>
<Member MemberName="EnableViewState">
<MemberSignature Language="C#" Value="public virtual bool EnableViewState { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool EnableViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.EnableViewState" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property EnableViewState As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool EnableViewState { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.EnableViewState : bool with get, set" Usage="System.Web.UI.Control.EnableViewState" />
<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-1.1;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">
<AttributeName>System.ComponentModel.DefaultValue(true)</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">
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client.</summary>
<value>
<see langword="true" /> if the server control maintains its view state; otherwise <see langword="false" />. The default is <see langword="true" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
View state enables a server control to maintain its state across HTTP requests. View state for a control is enabled if all of the following conditions are met:
- The <xref:System.Web.UI.Control.EnableViewState%2A> property for the page is set to `true`.
- The <xref:System.Web.UI.Control.EnableViewState%2A> property for the control is set to `true`.
- The <xref:System.Web.UI.Control.ViewStateMode%2A> property for the control is set to <xref:System.Web.UI.ViewStateMode.Enabled> or inherits the <xref:System.Web.UI.ViewStateMode.Enabled> setting.
For more information, see the <xref:System.Web.UI.Control.ViewStateMode%2A> property.
A server control's view state is the accumulation of all its property values. In order to preserve these values across HTTP requests, ASP.NET uses an instance of the <xref:System.Web.UI.StateBag> class to store the property values. The values are then passed as a variable to a hidden field when subsequent requests are processed. For more information about view state, see [ASP.NET View State Overview](http://msdn.microsoft.com/library/19d2a6ed-9a77-4c7c-a7f5-74dd4b6c3818).
There are times when it is appropriate to disable view state, particularly to improve application performance. For example, if you are loading a database request into a server control, set this property to `false`. If you do not, processor time will be wasted loading view state into the server control that will only be overridden by the database query. If <xref:System.Web.UI.Control.EnableViewState%2A> is `false`, you can use the control state to persist property information that is specific to a control and cannot be turned off like the view state property. For more information on the difference between control state and view state, see [Control State vs. View State Example](http://msdn.microsoft.com/library/9e98c7de-a888-48df-b14e-02ec8bef7681).
For information about how to enable or disable view state declaratively for an ASP.NET page, see [\@ Page](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ydy4x04a(v=vs.100)).
## Examples
The following example sets the <xref:System.Web.UI.Control.EnableViewState%2A> property to `false`.
[!code-csharp[Control_StateManagement#7](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_statemanagement.cs.aspx#7)]
[!code-vb[Control_StateManagement#7](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_statemanagement.vb.aspx#7)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewStateMode" />
<altmember cref="P:System.Web.UI.Control.ViewState" />
<altmember cref="M:System.Web.UI.Control.LoadViewState(System.Object)" />
<altmember cref="M:System.Web.UI.Control.SaveViewState" />
<altmember cref="P:System.Web.UI.Control.IsViewStateEnabled" />
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
<related type="Article" href="https://msdn.microsoft.com/library/0218d965-5d30-445b-b6a6-8870e70e63ce(v=vs.100)">ASP.NET State Management Overview</related>
<related type="Article" href="http://msdn.microsoft.com/library/9e98c7de-a888-48df-b14e-02ec8bef7681">Control State vs. View State Example</related>
</Docs>
</Member>
<Member MemberName="EndRenderTracing">
<MemberSignature Language="C#" Value="protected void EndRenderTracing (System.IO.TextWriter writer, object traceObject);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void EndRenderTracing(class System.IO.TextWriter writer, object traceObject) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.EndRenderTracing(System.IO.TextWriter,System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Sub EndRenderTracing (writer As TextWriter, traceObject As Object)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void EndRenderTracing(System::IO::TextWriter ^ writer, System::Object ^ traceObject);" />
<MemberSignature Language="F#" Value="member this.EndRenderTracing : System.IO.TextWriter * obj -&gt; unit" Usage="control.EndRenderTracing (writer, traceObject)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.EditorBrowsable</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="writer" Type="System.IO.TextWriter" />
<Parameter Name="traceObject" Type="System.Object" />
</Parameters>
<Docs>
<param name="writer">The object that writes trace data.</param>
<param name="traceObject">The trace object.</param>
<summary>Ends design-time tracing of rendering data.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="EnsureChildControls">
<MemberSignature Language="C#" Value="protected virtual void EnsureChildControls ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void EnsureChildControls() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.EnsureChildControls" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub EnsureChildControls ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void EnsureChildControls();" />
<MemberSignature Language="F#" Value="abstract member EnsureChildControls : unit -&gt; unit&#xA;override this.EnsureChildControls : unit -&gt; unit" Usage="control.EnsureChildControls " />
<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>Determines whether the server control contains child controls. If it does not, it creates child controls.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method first checks the current value of the <xref:System.Web.UI.Control.ChildControlsCreated%2A> property. If this value is `false`, the <xref:System.Web.UI.Control.CreateChildControls%2A> method is called.
The <xref:System.Web.UI.Control.EnsureChildControls%2A> method is typically used in composite controls, which are controls that use child controls for some or all their functionality. The <xref:System.Web.UI.Control.EnsureChildControls%2A> method is called in order to make sure that child controls have been created and are ready to process input, to perform data binding, or to perform other tasks.
The <xref:System.Web.UI.WebControls.GridView> control is an example of a composite control. It creates child controls such as <xref:System.Web.UI.WebControls.Table>, <xref:System.Web.UI.WebControls.TableRow>, <xref:System.Web.UI.WebControls.TableCell>, <xref:System.Web.UI.WebControls.Label>, and <xref:System.Web.UI.WebControls.TextBox> controls, which are used to render the HTML table that the <xref:System.Web.UI.WebControls.GridView> generates.
In most cases, custom server control developers do not have to override this method. If you do override this method, use it in a way similar to the default behavior.
## Examples
The following example uses the <xref:System.Web.UI.Control.EnsureChildControls%2A> method to ensure that the current server control has child controls. It then gets or sets a <xref:System.Web.UI.WebControls.TextBox.Text%2A> property for a child <xref:System.Web.UI.WebControls.TextBox> Web control in the current server control's <xref:System.Web.UI.ControlCollection> object.
> [!IMPORTANT]
> This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](http://msdn.microsoft.com/library/772c7312-211a-4eb3-8d6e-eec0aa1dcc07).
[!code-csharp[SystemWebUIControl CreateChildControls and EnsureChildControls#1](~/samples/snippets/csharp/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/CS/compositecontrolsample1.cs#1)]
[!code-vb[SystemWebUIControl CreateChildControls and EnsureChildControls#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/SystemWebUIControl CreateChildControls and EnsureChildControls/VB/compositecontrolsample1.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.Controls" />
<altmember cref="P:System.Web.UI.Control.ChildControlsCreated" />
<altmember cref="M:System.Web.UI.Control.CreateChildControls" />
</Docs>
</Member>
<Member MemberName="EnsureID">
<MemberSignature Language="C#" Value="protected void EnsureID ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance void EnsureID() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.EnsureID" />
<MemberSignature Language="VB.NET" Value="Protected Sub EnsureID ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; void EnsureID();" />
<MemberSignature Language="F#" Value="member this.EnsureID : unit -&gt; unit" Usage="control.EnsureID " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates an identifier for controls that do not have an identifier assigned.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.EnsureID%2A> method generates an identifier for controls that are contained in another control. Identifiers are generated only for controls that do not have a value assigned to the <xref:System.Web.UI.Control.ID%2A> property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Events">
<MemberSignature Language="C#" Value="protected System.ComponentModel.EventHandlerList Events { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ComponentModel.EventHandlerList Events" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.Events" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property Events As EventHandlerList" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property System::ComponentModel::EventHandlerList ^ Events { System::ComponentModel::EventHandlerList ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Events : System.ComponentModel.EventHandlerList" Usage="System.Web.UI.Control.Events" />
<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-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ComponentModel.EventHandlerList</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a list of event handler delegates for the control. This property is read-only.</summary>
<value>The list of event handler delegates.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is of type <xref:System.ComponentModel.EventHandlerList>, which uses a linear search algorithm to find entries in the list of delegates. A linear search algorithm is inefficient when working with a large number of entries. Therefore, when you have a large list, finding entries with this property will be slow.
## Examples
The following example creates an event, named `Click`, that adds and removes handlers from the control's <xref:System.ComponentModel.EventHandlerList> collection when the event is called from a page.
**Note** This example optimizes how a control adds and removes events from the list of them that the control maintains. If you create custom control and want to define an event, use code similar to this. This technique can be used in C#, but not in Visual Basic.
[!code-csharp[System.Web.UI.Page_VerifyRenderingInServerForm#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page_VerifyRenderingInServerForm/CS/testlinkbutton.cs#1)]
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.EventHandlerList" />
</Docs>
</Member>
<MemberGroup MemberName="FindControl">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Searches the current naming container for the specified server control.</summary>
</Docs>
</MemberGroup>
<Member MemberName="FindControl">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.Control FindControl (string id);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Web.UI.Control FindControl(string id) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.FindControl(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function FindControl (id As String) As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Web::UI::Control ^ FindControl(System::String ^ id);" />
<MemberSignature Language="F#" Value="abstract member FindControl : string -&gt; System.Web.UI.Control&#xA;override this.FindControl : string -&gt; System.Web.UI.Control" Usage="control.FindControl id" />
<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="id" Type="System.String" />
</Parameters>
<Docs>
<param name="id">The identifier for the control to be found.</param>
<summary>Searches the current naming container for a server control with the specified <paramref name="id" /> parameter.</summary>
<returns>The specified control, or <see langword="null" /> if the specified control does not exist.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use <xref:System.Web.UI.Control.FindControl%2A> to access a control from a function in a code-behind page, to access a control that is inside another container, or in other circumstances where the target control is not directly accessible to the caller. This method will find a control only if the control is directly contained by the specified container; that is, the method does not search throughout a hierarchy of controls within controls. For information about how to find a control when you do not know its immediate container, see [How to: Access Server Controls by ID](http://msdn.microsoft.com/library/59964ef8-72ef-4159-9f1a-5b230ff46fb3).
## Examples
The following example defines a `Button1_Click` event handler. When invoked, this handler uses the <xref:System.Web.UI.Control.FindControl%2A> method to locate a control with an <xref:System.Web.UI.Control.ID%2A> property of `TextBox2` on the containing page. If the control is found, its parent is determined using the <xref:System.Web.UI.Control.Parent%2A> property and the parent control's <xref:System.Web.UI.Control.ID%2A> is written to the page. If `TextBox2` is not found, "Control Not Found" is written to the page.
> [!IMPORTANT]
> This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see [Script Exploits Overview](http://msdn.microsoft.com/library/772c7312-211a-4eb3-8d6e-eec0aa1dcc07).
[!code-csharp[System.Web.UI.Page.Parent_FindControl#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/CS/control_parent.cs.aspx#1)]
[!code-vb[System.Web.UI.Page.Parent_FindControl#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Page.Parent_FindControl/VB/control_parent.vb.aspx#1)]
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/59964ef8-72ef-4159-9f1a-5b230ff46fb3">How to: Access Server Controls by ID</related>
</Docs>
</Member>
<Member MemberName="FindControl">
<MemberSignature Language="C#" Value="protected virtual System.Web.UI.Control FindControl (string id, int pathOffset);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Web.UI.Control FindControl(string id, int32 pathOffset) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.FindControl(System.String,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function FindControl (id As String, pathOffset As Integer) As Control" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual System::Web::UI::Control ^ FindControl(System::String ^ id, int pathOffset);" />
<MemberSignature Language="F#" Value="abstract member FindControl : string * int -&gt; System.Web.UI.Control&#xA;override this.FindControl : string * int -&gt; System.Web.UI.Control" Usage="control.FindControl (id, pathOffset)" />
<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="id" Type="System.String" />
<Parameter Name="pathOffset" Type="System.Int32" />
</Parameters>
<Docs>
<param name="id">The identifier for the control to be found.</param>
<param name="pathOffset">The number of controls up the page control hierarchy needed to reach a naming container.</param>
<summary>Searches the current naming container for a server control with the specified <paramref name="id" /> and an integer, specified in the <paramref name="pathOffset" /> parameter, which aids in the search. You should not override this version of the <see cref="Overload:System.Web.UI.Control.FindControl" /> method.</summary>
<returns>The specified control, or <see langword="null" /> if the specified control does not exist.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Focus">
<MemberSignature Language="C#" Value="public virtual void Focus ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Focus() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.Focus" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Focus ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Focus();" />
<MemberSignature Language="F#" Value="abstract member Focus : unit -&gt; unit&#xA;override this.Focus : unit -&gt; unit" Usage="control.Focus " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Sets input focus to a control.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Web.UI.Control.Focus%2A> method to set the initial focus of the Web page to the control. The page will be opened in the browser with the control selected.
The <xref:System.Web.UI.Control.Focus%2A> method causes a call to the page focus script to be emitted on the rendered page. If the page does not contain a control with an HTML `ID` attribute that matches the control that the <xref:System.Web.UI.Control.Focus%2A> method was invoked on, then page focus will not be set. An example where this can occur is when you set the focus on a user control instead of setting the focus on a child control of the user control. In this scenario, you can use the <xref:System.Web.UI.Control.FindControl%2A> method to find the child control of the user control and invoke its <xref:System.Web.UI.Control.Focus%2A> method.
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.FindControl(System.String)" />
<altmember cref="M:System.Web.UI.Page.SetFocus(System.Web.UI.Control)" />
</Docs>
</Member>
<Member MemberName="GetDesignModeState">
<MemberSignature Language="C#" Value="protected virtual System.Collections.IDictionary GetDesignModeState ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Collections.IDictionary GetDesignModeState() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.GetDesignModeState" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function GetDesignModeState () As IDictionary" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual System::Collections::IDictionary ^ GetDesignModeState();" />
<MemberSignature Language="F#" Value="abstract member GetDesignModeState : unit -&gt; System.Collections.IDictionary&#xA;override this.GetDesignModeState : unit -&gt; System.Collections.IDictionary" Usage="control.GetDesignModeState " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Web.UI.IControlDesignerAccessor.GetDesignModeState</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IDictionary</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets design-time data for a control.</summary>
<returns>An <see cref="T:System.Collections.IDictionary" /> containing the design-time data for the control.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.GetDesignModeState%2A> method returns design-time data for a control.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="M:System.Web.UI.Control.GetDesignModeState" /> method returns <see langword="null" /> by default. You must override this method to provide the design-time data your control requires.</para>
</block>
<altmember cref="T:System.Web.UI.IControlDesignerAccessor" />
</Docs>
</Member>
<MemberGroup MemberName="GetRouteUrl">
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Gets the URL that corresponds to a set of route parameters, and optionally to a route name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is provided for coding convenience. It is equivalent to calling the <xref:System.Web.Routing.RouteCollection.GetVirtualPath%2A?displayProperty=nameWithType> method.
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/892441af-8f1d-483e-ab5f-b82c23576f5a">ASP.NET Routing</related>
</Docs>
</MemberGroup>
<Member MemberName="GetRouteUrl">
<MemberSignature Language="C#" Value="public string GetRouteUrl (object routeParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetRouteUrl(object routeParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.GetRouteUrl(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function GetRouteUrl (routeParameters As Object) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetRouteUrl(System::Object ^ routeParameters);" />
<MemberSignature Language="F#" Value="member this.GetRouteUrl : obj -&gt; string" Usage="control.GetRouteUrl routeParameters" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="routeParameters" Type="System.Object" />
</Parameters>
<Docs>
<param name="routeParameters">The route parameters.</param>
<summary>Gets the URL that corresponds to a set of route parameters.</summary>
<returns>The URL that corresponds to the specified route parameters.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is provided for coding convenience. It is equivalent to calling the <xref:System.Web.Routing.RouteCollection.GetVirtualPath%28System.Web.Routing.RequestContext%2CSystem.Web.Routing.RouteValueDictionary%29?displayProperty=nameWithType> method. This method converts the object that is passed in `routeParameters` to a <xref:System.Web.Routing.RouteValueDictionary> object by using the <xref:System.Web.Routing.RouteValueDictionary.%23ctor%28System.Object%29?displayProperty=nameWithType> constructor.
## Examples
The following example shows how to call the <xref:System.Web.UI.Control.GetRouteUrl%2A?displayProperty=nameWithType> method to get the URL of a route that has parameters that are named `productid` and `category`. This example assumes that you have created a <xref:System.Web.UI.WebControls.HyperLink> control that is named `HyperLink1`.
```vb
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl(
New With {.productid = "1", .category = "widgets"})
```
```csharp
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl(
new { productid = "1", category = "widgets" });
```
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/892441af-8f1d-483e-ab5f-b82c23576f5a">ASP.NET Routing</related>
</Docs>
</Member>
<Member MemberName="GetRouteUrl">
<MemberSignature Language="C#" Value="public string GetRouteUrl (System.Web.Routing.RouteValueDictionary routeParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetRouteUrl(class System.Web.Routing.RouteValueDictionary routeParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.GetRouteUrl(System.Web.Routing.RouteValueDictionary)" />
<MemberSignature Language="VB.NET" Value="Public Function GetRouteUrl (routeParameters As RouteValueDictionary) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetRouteUrl(System::Web::Routing::RouteValueDictionary ^ routeParameters);" />
<MemberSignature Language="F#" Value="member this.GetRouteUrl : System.Web.Routing.RouteValueDictionary -&gt; string" Usage="control.GetRouteUrl routeParameters" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<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.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="routeParameters" Type="System.Web.Routing.RouteValueDictionary" />
</Parameters>
<Docs>
<param name="routeParameters">The route parameters.</param>
<summary>Gets the URL that corresponds to a set of route parameters.</summary>
<returns>The URL that corresponds to the specified route parameters.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is provided for coding convenience. It is equivalent to calling the <xref:System.Web.Routing.RouteCollection.GetVirtualPath%28System.Web.Routing.RequestContext%2CSystem.Web.Routing.RouteValueDictionary%29?displayProperty=nameWithType> method.
## Examples
The following example shows how to call this method to get the URL of a route that has parameters that are named `productid` and `category`. This example assumes that you have created a <xref:System.Web.UI.WebControls.HyperLink> control that is named `HyperLink1`.
```vb
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl(
new RouteValueDictionary {productId="1", category="widgets"})
```
```csharp
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl(
(new RouteValueDictionary {productId="1", category="widgets"});
```
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/892441af-8f1d-483e-ab5f-b82c23576f5a">ASP.NET Routing</related>
</Docs>
</Member>
<Member MemberName="GetRouteUrl">
<MemberSignature Language="C#" Value="public string GetRouteUrl (string routeName, object routeParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetRouteUrl(string routeName, object routeParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.GetRouteUrl(System.String,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function GetRouteUrl (routeName As String, routeParameters As Object) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetRouteUrl(System::String ^ routeName, System::Object ^ routeParameters);" />
<MemberSignature Language="F#" Value="member this.GetRouteUrl : string * obj -&gt; string" Usage="control.GetRouteUrl (routeName, routeParameters)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="routeName" Type="System.String" />
<Parameter Name="routeParameters" Type="System.Object" />
</Parameters>
<Docs>
<param name="routeName">The name of the route.</param>
<param name="routeParameters">The route parameters.</param>
<summary>Gets the URL that corresponds to a set of route parameters and a route name.</summary>
<returns>The URL that corresponds to the specified route parameters and route name.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is provided for coding convenience. It is equivalent to calling the <xref:System.Web.Routing.RouteCollection.GetVirtualPath%28System.Web.Routing.RequestContext%2CSystem.String%2CSystem.Web.Routing.RouteValueDictionary%29?displayProperty=nameWithType> method. This method converts the object that is passed in `routeParameters` to a <xref:System.Web.Routing.RouteValueDictionary> object by using the <xref:System.Web.Routing.RouteValueDictionary.%23ctor%28System.Object%29?displayProperty=nameWithType> constructor.
## Examples
The following example shows how to call this method to get the URL of a route that is named `Product` and has parameters that are named `productid` and `category`. This example assumes that you have created a <xref:System.Web.UI.WebControls.HyperLink> control that is named `HyperLink1`.
```vb
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product",
New With {.productid = "1", .category = "widgets"})
```
```csharp
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product",
new { productid = "1", category = "widgets" });
```
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/892441af-8f1d-483e-ab5f-b82c23576f5a">ASP.NET Routing</related>
</Docs>
</Member>
<Member MemberName="GetRouteUrl">
<MemberSignature Language="C#" Value="public string GetRouteUrl (string routeName, System.Web.Routing.RouteValueDictionary routeParameters);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetRouteUrl(string routeName, class System.Web.Routing.RouteValueDictionary routeParameters) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.GetRouteUrl(System.String,System.Web.Routing.RouteValueDictionary)" />
<MemberSignature Language="VB.NET" Value="Public Function GetRouteUrl (routeName As String, routeParameters As RouteValueDictionary) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetRouteUrl(System::String ^ routeName, System::Web::Routing::RouteValueDictionary ^ routeParameters);" />
<MemberSignature Language="F#" Value="member this.GetRouteUrl : string * System.Web.Routing.RouteValueDictionary -&gt; string" Usage="control.GetRouteUrl (routeName, routeParameters)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="routeName" Type="System.String" />
<Parameter Name="routeParameters" Type="System.Web.Routing.RouteValueDictionary" />
</Parameters>
<Docs>
<param name="routeName">The name of the route.</param>
<param name="routeParameters">The route parameters.</param>
<summary>Gets the URL that corresponds to a set of route parameters and a route name.</summary>
<returns>The URL that corresponds to the specified route parameters and route name.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is provided for coding convenience. It is equivalent to calling the <xref:System.Web.Routing.RouteCollection.GetVirtualPath%28System.Web.Routing.RequestContext%2CSystem.String%2CSystem.Web.Routing.RouteValueDictionary%29?displayProperty=nameWithType> method.
## Examples
The following example shows how to call this method to get the URL of a route that is named `Product` and has parameters that are named `productid` and `category`. This example assumes that you have created a <xref:System.Web.UI.WebControls.HyperLink> control that is named `HyperLink1`.
```vb
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product",
new RouteValueDictionary {productId="1", category="widgets"})
```
```csharp
HyperLink1.NavigateUrl = HyperLink1.GetRouteUrl("Product",
(new RouteValueDictionary {productId="1", category="widgets"});
```
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/892441af-8f1d-483e-ab5f-b82c23576f5a">ASP.NET Routing</related>
</Docs>
</Member>
<Member MemberName="GetUniqueIDRelativeTo">
<MemberSignature Language="C#" Value="public string GetUniqueIDRelativeTo (System.Web.UI.Control control);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetUniqueIDRelativeTo(class System.Web.UI.Control control) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.GetUniqueIDRelativeTo(System.Web.UI.Control)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetUniqueIDRelativeTo(System::Web::UI::Control ^ control);" />
<MemberSignature Language="F#" Value="member this.GetUniqueIDRelativeTo : System.Web.UI.Control -&gt; string" Usage="control.GetUniqueIDRelativeTo control" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="control" Type="System.Web.UI.Control" />
</Parameters>
<Docs>
<param name="control">A control that is within a naming container.</param>
<summary>Returns the prefixed portion of the <see cref="P:System.Web.UI.Control.UniqueID" /> property of the specified control.</summary>
<returns>The prefixed portion of the <see cref="P:System.Web.UI.Control.UniqueID" /> property of the specified control.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Web.UI.Control.UniqueID%2A> property of a control is generated by adding a prefix to the control's <xref:System.Web.UI.Control.ID%2A> property. The prefix is composed of the <xref:System.Web.UI.Control.UniqueID%2A> property of the control's naming container concatenated with a separator character. If the naming container is the page, there is no prefix. This method returns the prefix string. If there is no prefix string, it returns the <xref:System.Web.UI.Control.UniqueID%2A> value of the control.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="P:System.Web.UI.Control.NamingContainer" /> property of <paramref name="control" /> is <see langword="null" />.</exception>
<exception cref="T:System.ArgumentNullException">
<paramref name="control" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="HasChildViewState">
<MemberSignature Language="C#" Value="protected bool HasChildViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool HasChildViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.HasChildViewState" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property HasChildViewState As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property bool HasChildViewState { bool get(); };" />
<MemberSignature Language="F#" Value="member this.HasChildViewState : bool" Usage="System.Web.UI.Control.HasChildViewState" />
<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>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the current server control's child controls have any saved view-state settings.</summary>
<value>
<see langword="true" /> if any child controls have saved view state information; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can avoid unnecessary calls to the <xref:System.Web.UI.Control.ClearChildViewState%2A> method by using this property to verify that any child controls of the server control are storing view-state information.
## Examples
[!code-csharp[Control_StateManagement#5](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#5)]
[!code-vb[Control_StateManagement#5](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#5)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
</Docs>
</Member>
<Member MemberName="HasControls">
<MemberSignature Language="C#" Value="public virtual bool HasControls ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool HasControls() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.HasControls" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function HasControls () As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool HasControls();" />
<MemberSignature Language="F#" Value="abstract member HasControls : unit -&gt; bool&#xA;override this.HasControls : unit -&gt; bool" Usage="control.HasControls " />
<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.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Determines if the server control contains any child controls.</summary>
<returns>
<see langword="true" /> if the control contains other controls; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Since this method simply determines if any child controls exist, it can enhance performance by allowing you to avoid an unnecessary <xref:System.Web.UI.ControlCollection.Count%2A> property call. Calls to this property require a <xref:System.Web.UI.ControlCollection> object to be instantiated. If there are no children, this object creation wastes server resources.
## Examples
The following example uses the <xref:System.Web.UI.Control.HasControls%2A> method to determine if any controls exist before using the <xref:System.Web.UI.ControlCollection.Count%2A> property to iterate through a <xref:System.Web.UI.ControlCollection> object.
[!code-csharp[Classic Control.HasControls Example#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Classic Control.HasControls Example/CS/source.cs#1)]
[!code-vb[Classic Control.HasControls Example#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Classic Control.HasControls Example/VB/source.vb#1)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="M:System.Web.UI.Control.HasControls" /> method should be overridden only to change metadata attributes such as <see cref="T:System.ComponentModel.EditorBrowsableAttribute" />. For more information about using attributes, see [Attributes](~/docs/standard/attributes/index.md).</para>
</block>
<altmember cref="P:System.Web.UI.Control.Controls" />
<altmember cref="T:System.Web.UI.ControlCollection" />
</Docs>
</Member>
<Member MemberName="HasEvents">
<MemberSignature Language="C#" Value="protected bool HasEvents ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance bool HasEvents() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.HasEvents" />
<MemberSignature Language="VB.NET" Value="Protected Function HasEvents () As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; bool HasEvents();" />
<MemberSignature Language="F#" Value="member this.HasEvents : unit -&gt; bool" Usage="control.HasEvents " />
<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;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a value indicating whether events are registered for the control or any child controls.</summary>
<returns>
<see langword="true" /> if events are registered; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ID">
<MemberSignature Language="C#" Value="public virtual string ID { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ID" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.ID" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ID As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ ID { System::String ^ get(); void set(System::String ^ value); };" />
<MemberSignature Language="F#" Value="member this.ID : string with get, set" Usage="System.Web.UI.Control.ID" />
<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-1.1;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">
<AttributeName>System.ComponentModel.MergableProperty(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;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">
<AttributeName>System.ComponentModel.ParenthesizePropertyName(true)</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">
<AttributeName>System.Web.UI.Filterable(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">
<AttributeName>System.Web.UI.Themeable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the programmatic identifier assigned to the server control.</summary>
<value>The programmatic identifier assigned to the control.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Setting this property on a server control provides you with programmatic access to the server control's properties, events, and methods. This property can be set by Web developers by declaring an <xref:System.Web.UI.Control.ID%2A> attribute in the opening tag of an ASP.NET server control.
If this property is not specified for a server control, either declaratively or programmatically, you can obtain a reference to the control through its parent control's <xref:System.Web.UI.Control.Controls%2A> property.
> [!NOTE]
> Only combinations of alphanumeric characters and the underscore character ( _ ) are valid values for this property. Including spaces or other invalid characters will cause an ASP.NET page parser error.
## Examples
[!code-csharp[Control_Sample#2](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_Sample/CS/controlclass_samples.cs.aspx#2)]
[!code-vb[Control_Sample#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample/VB/controlclass_samples.vb.aspx#2)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.NamingContainer" />
<altmember cref="T:System.Web.UI.INamingContainer" />
</Docs>
</Member>
<Member MemberName="IdSeparator">
<MemberSignature Language="C#" Value="protected char IdSeparator { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance char IdSeparator" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.IdSeparator" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property IdSeparator As Char" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property char IdSeparator { char get(); };" />
<MemberSignature Language="F#" Value="member this.IdSeparator : char" Usage="System.Web.UI.Control.IdSeparator" />
<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-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Char</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the character used to separate control identifiers.</summary>
<value>The separator character. The default is "$".</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The character contained in the <xref:System.Web.UI.Control.IdSeparator%2A> property is used to separate the control identifiers for child controls. The ID separator character is appended to the <xref:System.Web.UI.Control.ID%2A> property.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Init">
<MemberSignature Language="C#" Value="public event EventHandler Init;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Init" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.Control.Init" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Init As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ Init;" />
<MemberSignature Language="F#" Value="member this.Init : EventHandler " Usage="member this.Init : 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 the server control is initialized, which is the first step in its lifecycle.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Server controls should perform any initialization steps that are required to create and set up an instance. You cannot use view-state information within this event; it is not populated yet. You should not access another server control during this event, regardless of whether it is a child or parent to this control. Other server controls are not certain to be created and ready for access. For more information on server control events, see [ASP.NET Web Forms Server Control Event Model](http://msdn.microsoft.com/library/6304bff7-1b0e-4641-8acb-6d3b0badc4a3).
## Examples
The following example assigns a custom event handler, `Calendar_Init`, to the `Init` event of a <xref:System.Web.UI.WebControls.Calendar> control.
[!code-aspx-csharp[Control_Sample#4](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_Sample/CS/controlclass_samples2.cs.aspx#4)]
[!code-aspx-vb[Control_Sample#4](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_Sample/VB/controlclass_samples2.vb.aspx#4)]
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="IsChildControlStateCleared">
<MemberSignature Language="C#" Value="protected internal bool IsChildControlStateCleared { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsChildControlStateCleared" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.IsChildControlStateCleared" />
<MemberSignature Language="VB.NET" Value="Protected Friend ReadOnly Property IsChildControlStateCleared As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; property bool IsChildControlStateCleared { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsChildControlStateCleared : bool" Usage="System.Web.UI.Control.IsChildControlStateCleared" />
<MemberType>Property</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>
<Docs>
<summary>Gets a value indicating whether controls contained within this control have control state.</summary>
<value>
<see langword="true" /> if children of this control do not use control state; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsLiteralContent">
<MemberSignature Language="C#" Value="protected bool IsLiteralContent ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig instance bool IsLiteralContent() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.IsLiteralContent" />
<MemberSignature Language="VB.NET" Value="Protected Function IsLiteralContent () As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; bool IsLiteralContent();" />
<MemberSignature Language="F#" Value="member this.IsLiteralContent : unit -&gt; bool" Usage="control.IsLiteralContent " />
<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.Boolean</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Determines if the server control holds only literal content.</summary>
<returns>
<see langword="true" /> if the server control contains solely literal content; otherwise <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When this method returns `true`, the server control's collection holds a single literal control.
## Examples
The following example checks whether the page that contains the server controls has posted back. If it has, it calls the <xref:System.Web.UI.Control.IsLiteralContent%2A> method to determine whether the control contains just literal content, or is a parent control to other server controls. If it contains solely literal content, the <xref:System.Web.UI.Control.UniqueID%2A> property of the <xref:System.Web.UI.LiteralControl> that represents that content is written to the response.
[!code-csharp[System.Web.UI.Control_ViewStateIgnoresCase#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/cs/controlsample_7.cs#1)]
[!code-vb[System.Web.UI.Control_ViewStateIgnoresCase#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_ViewStateIgnoresCase/VB/controlsample_7.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.HasControls" />
<altmember cref="T:System.Web.UI.LiteralControl" />
</Docs>
</Member>
<Member MemberName="IsTrackingViewState">
<MemberSignature Language="C#" Value="protected bool IsTrackingViewState { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsTrackingViewState" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.IsTrackingViewState" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property IsTrackingViewState As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property bool IsTrackingViewState { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsTrackingViewState : bool" Usage="System.Web.UI.Control.IsTrackingViewState" />
<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>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether the server control is saving changes to its view state.</summary>
<value>
<see langword="true" /> if the control is marked to save its state; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For a sample custom server control that uses this property, see [Templated Server Control Example](http://msdn.microsoft.com/library/986f63b8-6b50-42b9-a62d-a2f13cafa88b)
## Examples
The following example overrides the <xref:System.Web.UI.Control.DataBind%2A> method in a custom ASP.NET server control. It begins by calling the base <xref:System.Web.UI.Control.OnDataBinding%2A> method and then uses the `ControlCollection` object. <xref:System.Web.UI.ControlCollection.Clear%2A?displayProperty=nameWithType> method to delete all the child controls and the <xref:System.Web.UI.Control.ClearChildViewState%2A> method to delete any saved view-state settings for those child controls. Finally, the <xref:System.Web.UI.Control.ChildControlsCreated%2A> property is set to `true`. The control then uses the <xref:System.Web.UI.Control.IsTrackingViewState%2A> property to determine whether view-state change tracking is enabled for the control. If it is not enabled, the <xref:System.Web.UI.Control.TrackViewState%2A> method is called.
[!code-csharp[Control_StateManagement#4](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#4)]
[!code-vb[Control_StateManagement#4](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#4)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
<altmember cref="M:System.Web.UI.Control.LoadViewState(System.Object)" />
<altmember cref="M:System.Web.UI.Control.SaveViewState" />
</Docs>
</Member>
<Member MemberName="IsViewStateEnabled">
<MemberSignature Language="C#" Value="protected internal bool IsViewStateEnabled { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsViewStateEnabled" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.IsViewStateEnabled" />
<MemberSignature Language="VB.NET" Value="Protected Friend ReadOnly Property IsViewStateEnabled As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; property bool IsViewStateEnabled { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsViewStateEnabled : bool" Usage="System.Web.UI.Control.IsViewStateEnabled" />
<MemberType>Property</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>
<Docs>
<summary>Gets a value indicating whether view state is enabled for this control.</summary>
<value>
<see langword="true" /> if view state is enabled for the control; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
View state can be enabled at the page, container, or control level. When view state is disabled at the page or container level, view state is disabled for all controls contained by the page or container. The <xref:System.Web.UI.Control.IsViewStateEnabled%2A> property indicates whether view state is enabled by pages, containers, or controls.
It is possible for the <xref:System.Web.UI.Control.EnableViewState%2A> property and the <xref:System.Web.UI.Control.IsViewStateEnabled%2A> property to be different. For example, if the <xref:System.Web.UI.Page> containing the control has view state disabled, the <xref:System.Web.UI.Control.EnableViewState%2A> property can be `true` while the <xref:System.Web.UI.Control.IsViewStateEnabled%2A> property is `false`.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>Page developers will set the <see cref="P:System.Web.UI.Control.EnableViewState" /> property and the <see cref="P:System.Web.UI.Control.ViewStateMode" /> property to indicate whether they are using view state with your control. Use the <see cref="P:System.Web.UI.Control.IsViewStateEnabled" /> property and the <see cref="P:System.Web.UI.Control.ViewStateMode" /> property in your code to determine whether view state is enabled for your control and for all containers.</para>
</block>
<altmember cref="P:System.Web.UI.Control.EnableViewState" />
<altmember cref="P:System.Web.UI.Control.ViewStateMode" />
</Docs>
</Member>
<Member MemberName="Load">
<MemberSignature Language="C#" Value="public event EventHandler Load;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler Load" />
<MemberSignature Language="DocId" Value="E:System.Web.UI.Control.Load" />
<MemberSignature Language="VB.NET" Value="Public Custom Event Load As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:&#xA; event EventHandler ^ Load;" />
<MemberSignature Language="F#" Value="member this.Load : EventHandler " Usage="member this.Load : 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 the server control is loaded into the <see cref="T:System.Web.UI.Page" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Notifies the server control to perform any processing steps that are set to occur on each page request. You can access view state information and Web form POST data from this event. You can also access other server controls within the page's control hierarchy.
> [!NOTE]
> If you set a custom template in a control during the `Page_Load` event, the text values of child controls in the custom template will be lost. This occurs because the form values have already been loaded.
## Examples
[!code-csharp[System.Web.UI.Control_Load#2](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control_Load/CS/control_load.cs#2)]
[!code-vb[System.Web.UI.Control_Load#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control_Load/VB/control_load.vb#2)]
]]></format>
</remarks>
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="LoadControlState">
<MemberSignature Language="C#" Value="protected internal virtual void LoadControlState (object savedState);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig newslot virtual instance void LoadControlState(object savedState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.LoadControlState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Overridable Sub LoadControlState (savedState As Object)" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; virtual void LoadControlState(System::Object ^ savedState);" />
<MemberSignature Language="F#" Value="abstract member LoadControlState : obj -&gt; unit&#xA;override this.LoadControlState : obj -&gt; unit" Usage="control.LoadControlState savedState" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="savedState" Type="System.Object" />
</Parameters>
<Docs>
<param name="savedState">An <see cref="T:System.Object" /> that represents the control state to be restored.</param>
<summary>Restores control-state information from a previous page request that was saved by the <see cref="M:System.Web.UI.Control.SaveControlState" /> method.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Override this method when you need to specify how a custom server control restores its control state. For more information, see [ASP.NET State Management Overview](https://msdn.microsoft.com/library/0218d965-5d30-445b-b6a6-8870e70e63ce(v=vs.100)).
## Examples
The following code example overrides the <xref:System.Web.UI.Control.LoadControlState%2A> method in a custom ASP.NET control. When this method is invoked, it determines whether control state was previously saved for the control and, if so, sets the internal property `currentIndex` to the saved value.
The <xref:System.Web.UI.Control.OnInit%2A> method is overridden to call the <xref:System.Web.UI.Page.RegisterRequiresControlState%2A> method on the <xref:System.Web.UI.Control.Page%2A> to indicate that the custom control uses control state.
[!code-csharp[ControlState#1](~/samples/snippets/csharp/VS_Snippets_WebNet/ControlState/CS/controlstatecs.aspx#1)]
[!code-vb[ControlState#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/ControlState/VB/controlstatevb.aspx#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.SaveControlState" />
<altmember cref="P:System.Web.UI.Control.ViewState" />
<altmember cref="M:System.Web.UI.Control.SaveViewState" />
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="LoadViewState">
<MemberSignature Language="C#" Value="protected virtual void LoadViewState (object savedState);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void LoadViewState(object savedState) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.LoadViewState(System.Object)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub LoadViewState (savedState As Object)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void LoadViewState(System::Object ^ savedState);" />
<MemberSignature Language="F#" Value="abstract member LoadViewState : obj -&gt; unit&#xA;override this.LoadViewState : obj -&gt; unit" Usage="control.LoadViewState savedState" />
<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="savedState" Type="System.Object" />
</Parameters>
<Docs>
<param name="savedState">An <see cref="T:System.Object" /> that represents the control state to be restored.</param>
<summary>Restores view-state information from a previous page request that was saved by the <see cref="M:System.Web.UI.Control.SaveViewState" /> method.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see [ASP.NET State Management Overview](https://msdn.microsoft.com/library/0218d965-5d30-445b-b6a6-8870e70e63ce(v=vs.100)).
## Examples
The following example overrides the <xref:System.Web.UI.Control.LoadViewState%2A> method for a custom ASP.NET server control. It creates an <xref:System.Object> array to contain the view state information passed in the `savedState` parameter, and then calls the base implementation of the <xref:System.Web.UI.Control.LoadViewState%2A> method for the first index location of the array. It assigns the values stored at the next two index locations to variables named `UserText` and `PasswordText`, respectively.
[!code-csharp[Control_StateManagement#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_StateManagement/CS/control_state.cs#1)]
[!code-vb[Control_StateManagement#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_StateManagement/VB/control_state.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ViewState" />
<altmember cref="M:System.Web.UI.Control.SaveViewState" />
<related type="Article" href="http://msdn.microsoft.com/library/7949d756-1a79-464e-891f-904b1cfc7991">Introduction to the ASP.NET Page Life Cycle</related>
</Docs>
</Member>
<Member MemberName="LoadViewStateByID">
<MemberSignature Language="C#" Value="protected bool LoadViewStateByID { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool LoadViewStateByID" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.LoadViewStateByID" />
<MemberSignature Language="VB.NET" Value="Protected ReadOnly Property LoadViewStateByID As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; property bool LoadViewStateByID { bool get(); };" />
<MemberSignature Language="F#" Value="member this.LoadViewStateByID : bool" Usage="System.Web.UI.Control.LoadViewStateByID" />
<MemberType>Property</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>
<Docs>
<summary>Gets a value indicating whether the control participates in loading its view state by <see cref="P:System.Web.UI.Control.ID" /> instead of index.</summary>
<value>
<see langword="true" /> if the control loads its view state by <see cref="P:System.Web.UI.Control.ID" />; otherwise, <see langword="false" />. The default value is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
By default, when a parent control loads view state into child controls it creates, it does this by the position of each child control in the parent control's <xref:System.Web.UI.Control.Controls%2A> collection. When view state is initially applied, all child controls might not have been created. In this case, the view state for controls not yet created is saved, and applied when the child controls are created later.
For a parent control to apply view state to its child controls, two conditions must be met:
- On postback, the parent control must create the child controls in exactly the same order as the previous request so that the order of the controls remains consistent.
- After postback, any child controls created must be added to the end of the parent control's <xref:System.Web.UI.Control.Controls%2A> collection.
If these two conditions cannot be met, as in the case of the delayed creation of a child control, the parent control can load view state by using <xref:System.Web.UI.Control.ID%2A>. To set the <xref:System.Web.UI.Control.LoadViewStateByID%2A> property to `true`, use the <xref:System.Web.UI.ViewStateModeByIdAttribute> metadata attribute for the parent control.
]]></format>
</remarks>
<altmember cref="P:System.Web.UI.Control.ID" />
<altmember cref="M:System.Web.UI.Control.LoadViewState(System.Object)" />
<altmember cref="T:System.Web.UI.ViewStateModeByIdAttribute" />
</Docs>
</Member>
<Member MemberName="MapPathSecure">
<MemberSignature Language="C#" Value="protected internal string MapPathSecure (string virtualPath);" />
<MemberSignature Language="ILAsm" Value=".method familyorassemblyhidebysig instance string MapPathSecure(string virtualPath) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.MapPathSecure(System.String)" />
<MemberSignature Language="VB.NET" Value="Protected Friend Function MapPathSecure (virtualPath As String) As String" />
<MemberSignature Language="C++ CLI" Value="protected public:&#xA; System::String ^ MapPathSecure(System::String ^ virtualPath);" />
<MemberSignature Language="F#" Value="member this.MapPathSecure : string -&gt; string" Usage="control.MapPathSecure 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.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="virtualPath" Type="System.String" />
</Parameters>
<Docs>
<param name="virtualPath">A relative or root relative URL.</param>
<summary>Retrieves the physical path that a virtual path, either absolute or relative, maps to.</summary>
<returns>The physical path to the requested file.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method can only be used by server controls that have permissions to read files and which are part of fully trusted .dll files, such as System.Web.dll. This helps prevent security breaches.
## Examples
The following example uses the <xref:System.Web.UI.Control.MapPathSecure%2A> method to obtain the physical path of a virtual directory of the containing <xref:System.Web.UI.Page> or <xref:System.Web.UI.UserControl> object.
[!code-csharp[Control_MapPathSecure#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_MapPathSecure/CS/control_templatesourcedirectory.cs#1)]
[!code-vb[Control_MapPathSecure#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_MapPathSecure/VB/control_templatesourcedirectory.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="virtualPath" /> is <see langword="null" /> or an empty string ("").</exception>
</Docs>
</Member>
<Member MemberName="NamingContainer">
<MemberSignature Language="C#" Value="public virtual System.Web.UI.Control NamingContainer { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Web.UI.Control NamingContainer" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.Control.NamingContainer" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property NamingContainer As Control" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Web::UI::Control ^ NamingContainer { System::Web::UI::Control ^ get(); };" />
<MemberSignature Language="F#" Value="member this.NamingContainer : System.Web.UI.Control" Usage="System.Web.UI.Control.NamingContainer" />
<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">
<AttributeName>System.ComponentModel.Bindable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;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">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Web.UI.Control</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same <see cref="P:System.Web.UI.Control.ID" /> property value.</summary>
<value>The server control's naming container.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Each page in an ASP.NET Web application contains a hierarchy of controls. This hierarchy is not dependent on whether a control generates UI visible to the user. The naming container for a given control is the parent control above it in the hierarchy that implements the <xref:System.Web.UI.INamingContainer> interface. A server control that implements this interface creates a unique namespace for the <xref:System.Web.UI.Control.ID%2A> property values of its child server controls. You can use the <xref:System.Web.UI.Control.NamingContainer%2A> property of a naming container's child control to get a reference to its parent container.
Creating a unique namespace for server controls is particularly important when you bind Web server controls to data, such as the <xref:System.Web.UI.WebControls.Repeater> and <xref:System.Web.UI.WebControls.DataList> server controls. When multiple entries in the data source create multiple instances of a server control that is a child of the repeating control, the naming container ensures that each instance of these child controls have <xref:System.Web.UI.Control.UniqueID%2A> property values that do not conflict. The default naming container for a page is the instance of the <xref:System.Web.UI.Page> class that is generated when that page is requested.
The <xref:System.Web.UI.Control.ClientID%2A> property contains the value that is rendered as the element's `id` attribute in the HTML markup. Depending on the value that you assign to the <xref:System.Web.UI.Control.ClientIDMode%2A> property, the value that is generated for the <xref:System.Web.UI.Control.ClientID%2A> property might include the ID of the <xref:System.Web.UI.Control.NamingContainer%2A> object. When you set <xref:System.Web.UI.Control.ClientIDMode%2A> to <xref:System.Web.UI.ClientIDMode.Static>, the <xref:System.Web.UI.Control.ClientID%2A> value does not include the ID of the <xref:System.Web.UI.Control.NamingContainer%2A> object. When you set <xref:System.Web.UI.Control.ClientIDMode%2A> to either <xref:System.Web.UI.ClientIDMode.AutoID> or <xref:System.Web.UI.ClientIDMode.Predictable>, the <xref:System.Web.UI.Control.ClientID%2A> value will include the ID from the <xref:System.Web.UI.Control.NamingContainer%2A> object. For more information, see [ASP.NET Web Server Control Identification](http://msdn.microsoft.com/library/45a8c3ef-5ac7-48f1-862a-0cd5073742e7).
## Examples
The following example demonstrates using the <xref:System.Web.UI.Control.NamingContainer%2A> property.
[!code-aspx-csharp[Control_NamingContainer#1](~/samples/snippets/csharp/VS_Snippets_WebNet/Control_NamingContainer/CS/control_namingcontainer.cs.aspx#1)]
[!code-aspx-vb[Control_NamingContainer#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/Control_NamingContainer/VB/control_namingcontainer.vb.aspx#1)]
]]></format>
</remarks>
<altmember cref="T:System.Web.UI.INamingContainer" />
<altmember cref="P:System.Web.UI.Control.UniqueID" />
<altmember cref="P:System.Web.UI.Control.ID" />
</Docs>
</Member>
<Member MemberName="OnBubbleEvent">
<MemberSignature Language="C#" Value="protected virtual bool OnBubbleEvent (object source, EventArgs args);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance bool OnBubbleEvent(object source, class System.EventArgs args) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.Control.OnBubbleEvent(System.Object,System.EventArgs)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Function OnBubbleEvent (source As Object, args As EventArgs) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual bool OnBubbleEvent(System::Object ^ source, EventArgs ^ args);" />
<MemberSignature Language="F#" Value="abstract member OnBubbleEvent : obj * EventArgs -&gt; bool&#xA;override this.OnBubbleEvent : obj * EventArgs -&gt; bool" Usage="control.OnBubbleEvent (source, args)" />
<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.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.Object" />
<Parameter Name="args" Type="System.EventArgs" />
</Parameters>
<Docs>
<param name="source">The source of the event.</param>
<param name="args">An <see cref="T:System.EventArgs" /> object that contains the event data.</param>
<summary>Determines whether the event for the server control is passed up the page's UI server control hierarchy.</summary>
<returns>
<see langword="true" /> if the event has been canceled; otherwise, <see langword="false" />. The default is <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
ASP.NET server controls such as the <xref:System.Web.UI.WebControls.Repeater>, <xref:System.Web.UI.WebControls.DataList> and <xref:System.Web.UI.WebControls.GridView> Web controls can contain child controls that raise events. For example, each row in a <xref:System.Web.UI.WebControls.GridView> control can contain one or more buttons created dynamically by templates. Rather than each button raising an event individually, events from the nested controls are "bubbled"—that is, they are sent to the naming container. The naming container in turn raises a generic event called <xref:System.Web.UI.WebControls.GridView.RowCommand> with parameter values. These values allow you to determine which individual control that raised the original event. By responding to this single event, you can avoid having to write individual event-handling methods for child controls.
## Examples
The following example overrides the <xref:System.Web.UI.Control.OnBubbleEvent%2A> method in a custom ASP.NET server control, `ParentControl`. This method is invoked when a child control of `ParentControl` calls the <xref:System.Web.UI.Control.RaiseBubbleEvent%2A> method. When this happens, the `ParentControl` class writes two strings to the containing ASP.NET page, the first stating that its <xref:System.Web.UI.Control.OnBubbleEvent%2A> method has been called, the second identifying the source control of the <xref:System.Web.UI.Control.RaiseBubbleEvent%2A> method.
[!code-csharp[System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/CS/bubble.cs#1)]
[!code-vb[System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.Web.UI.Control.RaiseBubbleEvent_OnBubbleEvent/VB/bubble.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.Web.UI.Control.RaiseBubbleEvent(System.Object,System.EventArgs)" />
</Docs>
</Member>
<Member MemberName</