检测页面已加载到 Sharepoint Designer 中
Web 部件是否有办法确定托管页面正在加载到 SharePoint Designer 中?
Is there a way for a web part to figure out the hosting page is being loaded into SharePoint Designer ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查 Web 部件控件的 DesignMode 属性 - 如果在 SPD 中打开,则该属性为 true。这应该适用于所有 ASP.NET 控件。
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.
假设 WSS 3.0 / MOSS 2007,是:
或者,根据您的上下文,
更新:更粗略的方法可能是查看 HttpRequest 标头 - 我确信 SPD 发送了一个标头。
-奥辛
Assuming WSS 3.0 / MOSS 2007, Yes:
or, depending on your context,
Update: A cruder way might be to peek at the HttpRequest headers - I'm sure SPD sents a header.
-Oisin