ASP.NET BindingContainerProperty
Control Standard Properties Reference Manual
Definition and Usage
The BindingContainer property gets the control that contains the data binding for the control. The BindingContainer property contains a reference to the Control object that contains the data-binding information for the current control.
Tips and Notes
Note:This property supports the .NET infrastructure, but is not intended to be used directly in your code.
Note:The BindingContainer property is the same as the NamingContainer property, except when the control is part of a template. In that case, the BindingContainer property is set to the Control that defines the template.
Example
The following example shows the BindingContainer of a Button control:
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write("The binding container is: ")
Response.Write(button1.BindingContainer)
End Sub
</script>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get BindingContainer" runat="server" />
</form>
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write("The binding container is: ")
Response.Write(button1.BindingContainer)
End Sub
</script>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get BindingContainer" runat="server" />
</form>
Show example »
Control Standard Properties Reference Manual Other Extensions