带有 updatepanel 的 PopupControlExtender:chrome 问题

发布于 2024-12-04 09:41:36 字数 1056 浏览 1 评论 0原文

<asp:Panel ID="CreateGroupPanel" runat="server" 
           CssClass="style10" Visible="True" >
                <asp:ToolkitScriptManager ID="ToolkitScriptManager1" 
                                          runat="server">
                </asp:ToolkitScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
....
</ asp:UpdatePanel>
</asp: Panel>

<asp:Button ID="Btn_CreateGroupPopUp " 
            runat="server" 
            Text="Create Group" 
            Width="109px" />
<asp:PopupControlExtender ID="PopupControlExtender1" runat="server"
                          DynamicServicePath=""
                          Enabled="True" ExtenderControlID="" 
                          TargetControlID="Btn_CreateGroupPopUp" 
                          PopupControlID="CreateGroupPanel">
</asp:PopupControlExtender>

这里,当单击按钮 btn_CreateGroupPopUp 时,会弹出面板。它在 Internet Explorer 中工作正常,但是当我在 Chrome 中打开网站时,弹出窗口出现,然后页面自动刷新并关闭弹出窗口。这是什么问题,我的页面没有任何时间或元刷新。

<asp:Panel ID="CreateGroupPanel" runat="server" 
           CssClass="style10" Visible="True" >
                <asp:ToolkitScriptManager ID="ToolkitScriptManager1" 
                                          runat="server">
                </asp:ToolkitScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
....
</ asp:UpdatePanel>
</asp: Panel>

<asp:Button ID="Btn_CreateGroupPopUp " 
            runat="server" 
            Text="Create Group" 
            Width="109px" />
<asp:PopupControlExtender ID="PopupControlExtender1" runat="server"
                          DynamicServicePath=""
                          Enabled="True" ExtenderControlID="" 
                          TargetControlID="Btn_CreateGroupPopUp" 
                          PopupControlID="CreateGroupPanel">
</asp:PopupControlExtender>

here the panel is popup when button btn_CreateGroupPopUp is clicked. It works fine with internet explorer, but when I open the website in chrome, the pop up comes and then the page refreshes automatically and the pop up is closed. What is the problem with this, I don’t have any time or meta refresh in my page.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

oО清风挽发oО 2024-12-11 09:41:36

做了一些研究,我发现你应该有这样的东西让 UpdatePanel 与 webkit(这是 Safari 和 Chrome 的引擎)一起工作:

<asp:ScriptManager ID="ScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Path="~/Scripts/Safari3AjaxHack.js" />
    </Scripts>
</asp:ScriptManager>


Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
if( navigator.userAgent.indexOf( 'WebKit/' ) > -1 )
{
  Sys.Browser.agent = Sys.Browser.WebKit;
  Sys.Browser.version = parseFloat( navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
  Sys.Browser.name = 'WebKit';
}

你也可以检查互联网上关于 UpdatePanel 无法在 chrome 或 safari 中工作的许多链接我相信我在这里看到了类似的问题...

http://forums.asp.net/p/1252014/2898429.aspx

http://blog.lavablast.com/post/2008/10/Gotcha-WebKit-%28Safari-3-and-Google-Chrome%29-Bug-with-ASPNET-AJAX.aspx

Did some research and I have found out that you should have something like this to have UpdatePanel working with webkit (which is the engine of Safari and Chrome):

<asp:ScriptManager ID="ScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Path="~/Scripts/Safari3AjaxHack.js" />
    </Scripts>
</asp:ScriptManager>


Sys.Browser.WebKit = {}; //Safari 3 is considered WebKit
if( navigator.userAgent.indexOf( 'WebKit/' ) > -1 )
{
  Sys.Browser.agent = Sys.Browser.WebKit;
  Sys.Browser.version = parseFloat( navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);
  Sys.Browser.name = 'WebKit';
}

you can check many links on the internet about UpdatePanel not working in chrome or safari, also I believe I saw similar questions here in SO...

http://forums.asp.net/p/1252014/2898429.aspx

http://blog.lavablast.com/post/2008/10/Gotcha-WebKit-%28Safari-3-and-Google-Chrome%29-Bug-with-ASPNET-AJAX.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文