Rad Ajax 加载面板未显示在 asp.net 页面的回发中

发布于 2024-12-10 15:24:24 字数 3134 浏览 0 评论 0原文

我已经在这里呆了几个小时了。我有一个 Aspx 页面,带有几个用户控件。每当我在用户控件上调用任何 javascipt 时,列表视图都会更新,但不显示对话框。谁能告诉我原因或任何信息。这是我的代码。 ASPX页面

用户控制 javascript

 var album = $(this).prev().val();
                    $('[id$=AccessChoice]').val(option);
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(album);

用户控制

<telerik:RadAjaxManagerProxy  ID="FullAlbumAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="FullAlbumAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ListViewPanel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="lvFullControlAlbums">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdoSortDate">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdoSortName">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy >
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0" />

I have been at this for a couple of hours now. I have a Aspx page, with a couple user controls. Whenever I call any javascipt on the user control the listview updates but does not show the dialog. Can anyone please tell me why or any information. Here is my code.
aspx page

User control javascript

 var album = $(this).prev().val();
                    $('[id$=AccessChoice]').val(option);
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(album);

User control

<telerik:RadAjaxManagerProxy  ID="FullAlbumAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="FullAlbumAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ListViewPanel1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="lvFullControlAlbums">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="FullAlbumCounter" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdoSortDate">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdoSortName">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ListViewPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                <telerik:AjaxUpdatedControl ControlID="lvFullControlAlbums" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy >
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0" />

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

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

发布评论

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

评论(2

痕至 2024-12-17 15:24:24

这是一个老问题,但我会尝试回答,因为我遇到了同样的问题,这是我的解决方案:

ListView 不会渲染到 HTML 标记(我假设 ListViewPanel1lvFullControlAlbums 是 ListViews),因此您应该将这些控件包装在 Panel 中,并相应地修改 AjaxSettings

<telerik:AjaxSetting AjaxControlID="FullAlbumAjaxManager1">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="ListViewWrapper" LoadingPanelID="RadAjaxLoadingPanel1" />
    </UpdatedControls>
</telerik:AjaxSetting>

<asp:Panel ID="ListViewWrapper" runat="server">
    <asp:ListView ID="ListViewPanel1" runat="server" >
        <!-- your code here -->
    </asp:ListView>
</asp:Panel>

可能FullAlbumCounter 也是一个控件,它本身不呈现为 HTML 标记,仅呈现其内容。在这种情况下,您也应该这样做。

请参阅:
http://www.telerik .com/community/forums/aspnet-ajax/listview/loading-panel-not-showing-up.aspx

希望有帮助。

This is an old question, but I'll try to answer as I've got this same problem, and this is my solution:

ListView doesn't renders to an HTML tag (I assume ListViewPanel1 and lvFullControlAlbums are ListViews), so you should wrap these controls in a Panel and modify the AjaxSettings accordingly:

<telerik:AjaxSetting AjaxControlID="FullAlbumAjaxManager1">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="ListViewWrapper" LoadingPanelID="RadAjaxLoadingPanel1" />
    </UpdatedControls>
</telerik:AjaxSetting>

<asp:Panel ID="ListViewWrapper" runat="server">
    <asp:ListView ID="ListViewPanel1" runat="server" >
        <!-- your code here -->
    </asp:ListView>
</asp:Panel>

Probably FullAlbumCounter is also a control which itself is not rendered as an HTML tag only its content. In this case you should do the same.

See:
http://www.telerik.com/community/forums/aspnet-ajax/listview/loading-panel-not-showing-up.aspx

Hope it helps.

简单气质女生网名 2024-12-17 15:24:24

应该在 ajax 设置之一中使用 AjaxManager1 而不是 FullAlbumAjaxManager1

Should have had AjaxManager1 instead of FullAlbumAjaxManager1 in one of the ajax settings

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