如何以编程方式确定web部件是否呈现在Web部件页或WikiPage上?
发布于 2011-02-22 06:59:28
Type pageBaseType = this.Page.GetType().BaseType;
if (pageBaseType == typeof(Microsoft.SharePoint.WebPartPages.WebPartPage))
{
// Wiki Page
}
else if (pageBaseType == typeof(Microsoft.SharePoint.WebPartPages.WikiEditPage))
{
// Web Part Page
}https://stackoverflow.com/questions/5072180
复制相似问题