asp:点击Chrome内部的ListBox口吃

时间:2011-10-18 13:34:28

标签: asp.net google-chrome ajaxcontroltoolkit

我在asp:ListBox内的表格(并排)中有2个ModalPopUpExtender控件,并且在Chrome浏览器中的那些listBox中的每次点击都会产生口吃,就像它在屏幕上重绘一样。 (此行为仅发生在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

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

1 个答案:

答案 0 :(得分:0)

设置AutoPostBack="True"解决了它。