MOSS中判断当前页面是否Browser状态是否Share状态
bool flag = false;
SPWebPartManager currentWebPartManager = (SPWebPartManager) WebPartManager.GetCurrentWebPartManager(this.Page);
if ((currentWebPartManager != null) && (currentWebPartManager.DisplayMode == WebPartManager.BrowseDisplayMode))
{
PageView view = SPWeb.PageViewFromUri(this.Context.Request.Url, this.Context);
if ((view != PageView.Shared) && (view != PageView.Personal))
{
if (currentWebPartManager.HasPersonalizedParts)
{
flag = true;
}
}
else
{
flag = true;
}
}