Master page 取得 子頁面的元件 VB.NET
Dim abc As String
'P3 為 USERMTAControl
先從ContentPlaceHolder1找到P3
再由P3去取得旗下元件
Dim P3 As UserControl = DirectCast(ContentPlaceHolder1.FindControl("P3"), UserControl)
abc = CType(P3.FindControl("Labelaaaa1"), Label).Text
Response.Write("<script>alert('" + abc + "');</script>")
0 留言