【问题标题】:asp:ListBox stutter on click inside chromeasp:ListBox 在 chrome 内单击时出现口吃
【发布时间】:2012-05-16 03:19:01
【问题描述】:

我在ModalPopUpExtender 内的表格(并排)中有2 个asp:ListBox 控件,并且在Chrome 浏览器中的这些列表框内的每次点击都会产生口吃,就像在屏幕上重绘一样。 (此行为仅在 Chrome 中发生,并在 IE9、Safari 和 Firefox 中进行了测试)。

代码:

<tr id="Tr1">
    <td>
        <asp:ListBox ID="ListBoxAvailableChannels" runat="server" Width="300px" Height="500px"
            DataSourceID="ObjectDataSourceAvailableChannels" DataTextField="Name" DataValueField="Id"
            AutoPostBack="True"></asp:ListBox>
        <asp:ObjectDataSource ID="ObjectDataSourceAvailableChannels" runat="server" SelectMethod="GetAvailableChannelList"
            TypeName="PlayerDataProvider"></asp:ObjectDataSource>
    </td>
    <td>
        <table>
            <tr>
                <td>
                    <asp:ImageButton ID="ImageButtonAddChannel" runat="server" ImageUrl="~/Icons/Arrows/right.png" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:ImageButton ID="ImageButtonRemoveChannel" runat="server" ImageUrl="~/Icons/Arrows/left.png" />
                </td>
            </tr>
        </table>
    </td>
    <td>
        <asp:ListBox ID="ListBoxPlayerChannels" runat="server" Width="300px" Height="500px"
            DataSourceID="ObjectDataSourcePlayerChannels" DataTextField="Name" DataValueField="Id"
            AutoPostBack="True"></asp:ListBox>
        <asp:ObjectDataSource ID="ObjectDataSourcePlayerChannels" runat="server" SelectMethod="GetPlayerChannelList"
            TypeName="PlayerDataProvider">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="" Name="p_playerId" SessionField="SelectedPlayerId"
                    Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </td>
</tr>

使用:最新的 AjaxControlToolkit 和 .NET 4

口吃的原因是什么,我该如何摆脱它?

【问题讨论】:

    标签: asp.net google-chrome ajaxcontroltoolkit


    【解决方案1】:

    设置AutoPostBack="True"解决了。

    【讨论】:

      猜你喜欢
      • 2020-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-21
      • 1970-01-01
      • 2012-12-24
      • 1970-01-01
      相关资源
      最近更新 更多