在Code-Behind中操作WebUserControl
首先,建立一個名稱為WebPlaceHolder.aspx的Page.
在WebPlaceHolder.aspx中添加一個PlaceHolder控件.
PlaceHolder控件就是: 動態儲存 Web 網頁上加入的WebUserControl.
(重點就在使用PlaceHolder控件上)
其次,在加入一個名稱為WebUserControl1.ascx 的WebUserControl.
在WebUserControl1.ascx中添加如下代碼:

浙公网安备 33010602011771号