0
我使用Visual Studio 2010開發的Sharepoint 2010的SharePoint的WebParts - 作爲了.Designer.cs基礎用戶控件生成自定義用戶控件文件
一個網絡的一部分,我創建了我想要的用戶控件包括在我的網頁部分。然而,當我滴在MyWebPart.ascx用戶控制(在設計視圖)它獲取生成作爲MyWebPart.ascx.designer.cs如下:
protected global::System.Web.UI.UserControl customUserControl;
代替:
protected global::FullNamespace.ControlTemplates.MyUserControl customUserControl;
它工程,但我需要在後面的代碼中將customUserControl
投射到具體的MyUserControl中(例如,如果想在PageLoad事件中設置它的一些屬性)。
我該如何解決這個問題?