Latest web development tutorials

ASP.NET NamingContainer property

Control Standard Properties Reference Control Standard Properties Reference

Definition and Usage

NamingContainer property Gets a reference to control's naming container, which creates a unique namespace references to distinguish between controls with the same Control.ID property value.


Examples

The following example shows NamingContainer Button control:

<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write("The naming container is: ")
Response.Write(button1.NamingContainer)
End Sub
</script>

<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get NamingContainer" runat="server" />
</form>

The demonstration >>

Control Standard Properties Reference Control Standard Properties Reference