如何在 ItemTemplate 级别的 DataList 中嵌套唯一的 UpdatePanel?
我已成功将 DataList 嵌套在单个 UpdatePanel 中。然而,性能不太理想(2 - 8 秒刷新,我需要 1 秒)。当 UpdatePanel 更新时,它还会带来可用性问题,浏览器会捕捉到用户刷新页面时所在的位置(在 FireFox 中)。
为了增加单个项目的刷新,我想在数据列表的每个项目模板中实现独特的更新面板。但是,应用程序将不会构建,因为 UpdatePanel1 会出错,因为当前上下文中不存在。
建议?解决办法吗?其他方法?欢迎大家。
尊敬的
雷·K·拉根
I've successfully nested the DataList in a single UpdatePanel. However, the performance is less than desirable (2 - 8 second refreshes, I need 1 second). It also presents a usability problem as the UpdatePanel updates, the browser snaps to wherever the user was at the point of page refresh (in FireFox).
In hopes of increasing individual item refreshes, I wanted to implement unique updatepanels within each itemtemplate of the datalist. However, the application will not build, as UpdatePanel1 errors out as not existing in current context.
Suggestions? Work arounds? Alternative approaches? All are welcome.
Respectfully,
Ray K. Ragan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我必须解决这个问题;这是我的解决方案:
我重写了 SQL,使查询时间更快,这就是我的大部分延迟的来源。现在更新通常在 1 秒内发生。
滚动条解决方案之前发布过,这是您在 .aspx 页面中需要的代码:
James Westgate 在 StackOverflow 上的解决方案
I had to work around the problem; here's my solution:
I rewrote the SQL to make the query time much snappier, which was where the bulk of my latency was coming from. The updates routinely happen at 1 second now.
The scrollbar solution was posted previously, here's the code you need in your .aspx page:
James Westgate's Solution on StackOverflow