有没有办法让 Web 部件确定托管页面正在加载到 SharePoint Designer 中?
问问题
139 次
2 回答
1
假设 WSS 3.0 / MOSS 2007,是的:
SPContext.Current.IsRemoteAuthoringTime
或者,根据您的上下文,
SPContext.Current.IsDesigntime
更新:一种更粗略的方法可能是查看 HttpRequest 标头 - 我确定 SPD 发送了标头。
-Oisin
于 2009-11-14T20:48:41.217 回答
1
检查 Web 部件控件的 DesignMode 属性 - 如果它在 SPD 中打开,则为 true。这应该适用于所有 ASP.NET 控件。
于 2009-11-16T07:46:02.373 回答