0
我正在嘗試將webpart添加到aspx頁面下面粘貼webpart代碼。 我能夠看到頁面中的內容,但它不被識別爲webpart。Sharepoint webpart在aspx頁面-markup
using (SPLimitedWebPartManager wpm = file.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.User))
{
foreach (WebPart wp in wpm.WebParts)
}
我得到wpm.weparts.count = 0總是直到我自定義頁面並使其成爲未幻影。
我可以知道我在這裏做錯了嗎?