398 行数据列表减慢模态打开速度?
嘿伙计们,我遇到了一个奇怪的问题..我有一个仅在页面加载时加载的数据列表,它包含 2 列名称和日期,并且有 398 行..在 IE 7 及更高版本(可能还有以前的版本)中,当我通过点击按钮大约需要5秒才能打开。然而,如果我不绑定这个数据列表,它会快得多。
而且这只发生在 IE、Chrome、Firefox 和 Opera 中,它们都会在绑定数据列表的情况下立即打开模式...
Josh
<asp:DataList ID="dListObitOneLiner" runat="server" style="margin-left:5px;"
OnSelectedIndexChanged="dListObitOneLiner_SelectedIndexChanged"
RepeatColumns="1"
DataKeyField="ObitId" >
<ItemTemplate>
<asp:LinkButton ID="linkbObitOne" runat="server"
Text='<%# Eval("DeceasedName")%>'
CommandName="select"
Font-Names="Arial"
Font-Size="8pt"
ForeColor="Black"
Font-Bold="true"
Width="200px"
CssClass="MainSection_RecentObits_DataList">
</asp:LinkButton>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("ServiceDateTime")%>'
Font-Names="Arial"
Font-Size="8pt"
ForeColor="Black"
Font-Bold="true"
Width="125px"
CssClass="MainSection_RecentObits_DataList"></asp:Label>
</ItemTemplate>
<ItemStyle Font-Names="Arial" />
</asp:DataList>
Hey guys I got a weird issue.. I have a datalist that's only loaded on pageload it contains 2 columns a name and date and has 398 rows.. In IE 7 and above(and prob previous version) when I open a modal via a button click it takes almost 5 seconds to open. HOWEVER, if I do not bind this datalist it's MUCH faster..
Also this is only happening in IE, Chrome, Firefox and opera both open the modal instantly with the datalist binded...
Josh
<asp:DataList ID="dListObitOneLiner" runat="server" style="margin-left:5px;"
OnSelectedIndexChanged="dListObitOneLiner_SelectedIndexChanged"
RepeatColumns="1"
DataKeyField="ObitId" >
<ItemTemplate>
<asp:LinkButton ID="linkbObitOne" runat="server"
Text='<%# Eval("DeceasedName")%>'
CommandName="select"
Font-Names="Arial"
Font-Size="8pt"
ForeColor="Black"
Font-Bold="true"
Width="200px"
CssClass="MainSection_RecentObits_DataList">
</asp:LinkButton>
<asp:Label ID="Label6" runat="server" Text='<%# Eval("ServiceDateTime")%>'
Font-Names="Arial"
Font-Size="8pt"
ForeColor="Black"
Font-Bold="true"
Width="125px"
CssClass="MainSection_RecentObits_DataList"></asp:Label>
</ItemTemplate>
<ItemStyle Font-Names="Arial" />
</asp:DataList>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
很好地发现了问题,IE 渲染 398 个链接按钮的速度不是最快的,我必须转到分页选项并限制项目模板的数量。
Well found the problem, IE isn't the quickest at rendering 398 link buttons, I had to go to a paging option and limit the number of item templates.