【问题标题】:Detect page is loaded into Sharepoint Designer检测页面加载到 Sharepoint Designer
【发布时间】:2009-11-16 15:46:02
【问题描述】:

有没有办法让 Web 部件确定托管页面正在加载到 SharePoint Designer 中?

【问题讨论】:

    标签: sharepoint sharepoint-designer


    【解决方案1】:

    检查 Web 部件控件的 DesignMode 属性 - 如果它在 SPD 中打开,则为 true。这应该适用于所有 ASP.NET 控件。

    【讨论】:

      【解决方案2】:

      假设 WSS 3.0 / MOSS 2007,是的:

      SPContext.Current.IsRemoteAuthoringTime
      

      或者,根据您的上下文,

      SPContext.Current.IsDesigntime
      

      更新:更粗略的方法可能是查看 HttpRequest 标头 - 我确定 SPD 发送了标头。

      -奥辛

      【讨论】:

        猜你喜欢
        • 2019-01-24
        • 2021-12-05
        • 2011-02-16
        • 2012-05-22
        • 1970-01-01
        • 2013-07-16
        • 1970-01-01
        • 1970-01-01
        • 2017-11-06
        相关资源
        最近更新 更多