How do I check programmatically whether a web part is displayed in the shared resp. in personal mode.
views:
62answers:
1
+1
A:
The PersonalizationScope can be accessed like this:
public class MyWebPart: WebPart
{
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (WebPartManager.Personalization.Scope == PersonalizationScope.Shared)
{
// Do something
}
}
}
Jason
2010-05-05 11:16:17