ASP.NET BindingContainer Property

การกำหนดและการใช้งาน

ตัวแปร BindingContainer รับได้ Control ที่มีการบอกแบบของ Control

ตัวแปร BindingContainer มีอาทิตย์อุปกรณ์เชื่อมต่อกับ Control ที่มีข้อมูลการบอกแบบของ Control ในลักษณะนี้

คำแนะนำและหมายเหตุ

หมายเหตุ:ตัวแปรนี้สนับสนุนโครงสร้าง .NET แต่ไม่เหมาะสมที่จะใช้ในรหัสโค้ดโดยตรง

หมายเหตุ:ตัวแปร BindingContainer มีค่าเท่ากับ NamingContainer ตัวแปร ยกเว้นในขณะที่ Control อยู่ในส่วนหนึ่งของตัวแปร Template ในกรณีนี้ ตัวแปร BindingContainer จะถูกกำหนดโดย Control ที่กำหนด Template

ตัวอย่าง

ตัวอย่างนี้แสดง BindingContainer ของ Control button:

<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>

ตัวอย่าง

แสดง Button Control ที่มี BindingContainer