【问题标题】:ways to open a modal window from asp user control?从asp用户控件打开模式窗口的方法?
【发布时间】:2014-09-20 02:49:41
【问题描述】:

我正在尝试从我的 asp 用户控件中打开一个弹出/模式窗口。此弹出窗口将成为其他外部网站(例如:Google.com 或 Facebook.com)的占位符

我尝试过将 iFrame 与 ModalPopup 一起使用。但是 iFrame 在许多网站和显示消息方面存在问题 "此内容无法显示"

任何指针?

<asp:ImageButton ID="showPop" AlternateText="License Evidence Info" BorderWidth="0px" runat="server" ImageUrl="../../../Images/info.png" OnClientClick="updateObjectIframe(); return false;"/>
<div class="popover-content">
<div id="one" class="popover-content" >
<object id="foo" name="foo" type="text/html" data="http://www.google.com" class="popover-content"></object>
</div>
<asp:LinkButton ID="closeLicenseEvidencePop" Text="Close" runat="server"></asp:LinkButton>
</div>

【问题讨论】:

  • 尽可能避免使用 iframe,它们很难从“父”页面控制。你需要发布你的代码来展示你如何做弹出窗口。
  • @mason :尝试附加代码但不知道为什么没有附加..
  • `
    google.com" class="popover-content">
    ​​ton>
    `
  • 将你的代码放入问题中,并显示所有relevant code
  • @mason : 我意识到 iframe 不是一个好的选择,所以现在使用模态窗口弹出窗口.. 如果你能提出任何其他解决方案,那就太好了

标签: javascript asp.net iframe asp.net-ajax modalpopupextender


【解决方案1】:

【讨论】:

  • 那没有帮助...仍然收到此内容无法显示错误,同时使用 iFrame
  • 所以不能使用 iFrame.. 因为发布者决定是否可以在框架中使用网站.. 太糟糕了!! :(
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-01-12
  • 1970-01-01
  • 2015-02-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多