我在用户控件中有公共属性,我需要从HTML访问此属性以获取此用户控件的父级
Public Property ActorID As Integer
Set(value As Integer)
ViewState("ActorID") = value
End Set
Get
Return ViewState("ActorID")
End Get
End Property
<uc3:Hos_Applicants ID="Hos_Applicants1" runat="server" />
答案 0 :(得分:0)
<uc3:Hos_Applicants ID="Hos_Applicants1" runat="server" ActorID="2" />
您可以从父asp页面访问属性并在用户控件中设置值