Is there a way for a web part to figure out the hosting page is being loaded into SharePoint Designer ?
+1
A:
Assuming WSS 3.0 / MOSS 2007, Yes:
SPContext.Current.IsRemoteAuthoringTime
or, depending on your context,
SPContext.Current.IsDesigntime
Update: A cruder way might be to peek at the HttpRequest headers - I'm sure SPD sents a header.
-Oisin
x0n
2009-11-14 20:48:41
SPContext.Current.IsDesignTime worked for me. Thank you !
Leonidius
2009-11-18 16:28:28
+1
A:
Check the web part control's DesignMode property—it's true if it's open in SPD. This should work for all ASP.NET controls.
Morbo
2009-11-16 07:46:02