ASP.NET Parent 屬性
ASP.NET Parent 屬性

定義和用法
Parent 屬性獲取對控件的父控件的引用。
實例
下面的實例顯示包含 Button 控件的 Parent 元素:
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write("The Parent of the button control is: ")
Response.Write(button1.Parent)
End Sub
</script>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get Parent" runat="server" />
</form>
Sub Button1_Click(sender As Object, e As EventArgs)
Response.Write("The Parent of the button control is: ")
Response.Write(button1.Parent)
End Sub
</script>
<form runat="server" >
<asp:Button ID="button1" OnClick="Button1_Click"
Text="Get Parent" runat="server" />
</form>
演示實例 ?

相關文章
- ASP.NET Web Pages 圖表
- ASP.NET WebPages 幫助器參考手冊
- ASP.NET Razor VB 循環(huán)和數(shù)組
- ASP.NET 服務器控件
- ASP.NET XML 數(shù)據(jù)綁定
- ASP.NET DataList 控件
- WebSecurity HasUserId 屬性
- WebSecurity CreateAccount 方法
- ASP.NET HTML 控件 Checkbox
- ASP.NET HTML 控件 linkbutton
- ASP.NET HTML 控件 Radiobutton
- ASP.NET HTML 控件 SortedList DropDownList
- C# 實例 If Else 條件
- VB 實例 Else If 條件
- ASP.NET Calendar WeekendDayStyle 屬性
- ASP.NET CalendarDay IsToday 屬性
- ASP.NET CheckBoxList RepeatDirection 屬性
- ASP.NET ListBox Rows 屬性
- ASP.NET BulletedList BulletImageUrl 屬性
- ASP.NET Table GridLines 屬性