asp:ListBox 在 chrome 内点击时出现卡顿
我在 ModalPopUpExtender
内的表格内(并排)有 2 个 asp:ListBox
控件,并且在 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
口吃的原因是什么以及如何消除它?
I have 2 asp:ListBox
controls inside a table (side by side) that inside a ModalPopUpExtender
, and on every click inside those listBoxes in Chrome browser both make a stutter like it is redrawn on screen. (This behavior only happens in Chrome, tested as well with IE9, Safari and Firefox).
Code:
<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>
Using : Latest AjaxControlToolkit and .NET 4
What is the cause for the stutter and how do I get rid of it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
设置 AutoPostBack="True" 解决了这个问题。
Setting
AutoPostBack="True"
solved it.