动态添加Web控件\用户控件
时间:2011-05-22 来源:遇见米拉拉
'动态添加Web控件
Dim btnAdd As New Button
btnAdd.ID = "btnAdd"
btnAdd.Text = "New Button"
Me.Panel1.Controls.Add(btnAdd)
'动态添加用户控件
Dim uc As UC1
uc = CType(LoadControl("uc1.ascx"), UC1)
Me.Panel1.Controls.Add(uc)
相关阅读 更多 +