【问题标题】:SharePoint. Redirect from modal window to non-modal one?共享点。从模态窗口重定向到非模态窗口?
【发布时间】:2011-07-13 19:50:14
【问题描述】:

我已将具有该功能的自定义功能区部署到 SharePoint 服务器上的每个文档库。在功能区按钮上单击模式窗口与我的自定义页面一起显示。在某些情况下,我想将用户重定向回文档库(不是关闭模式窗口而是重定向)、文档库设置页面或安全存储服务凭据页面。 目前,当重定向完成时,新页面会在同一个模式窗口中打开。我想重定向到没有模式窗口的实际页面。 你能帮我解决这个问题吗?在 SharePoint 2010 中是否有用于执行此类重定向的 API?

先谢谢了,
-石油

【问题讨论】:

    标签: sharepoint redirect sharepoint-2010 modal-dialog


    【解决方案1】:

    考虑情况:您在文档页面上,并且在此页面上打开了“自定义文档操作”模式对话框:

    关闭模态对话框“自定义文档操作”并重定向到其他页面注册启动脚本到页面

     String script = String.Format("window.frameElement.navigateParent('{0}');",   SPHttpUtility.EcmaScriptStringLiteralEncode(urlToOtherPage));
     page.ClientScript.RegisterStartupScript(page.GetType(), "redirectToPage", script, true);
    

    【讨论】:

    • 非常感谢您的帮助!我使用了下一个脚本: string script = string.Format("window.top.location.href = '{0}';", SPHttpUtility.EcmaScriptStringLiteralEncode(redirectUrl));
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-04
    • 1970-01-01
    • 2016-12-11
    • 1970-01-01
    相关资源
    最近更新 更多