数据绑定到下拉列表时,浏览器停止响应

问题描述 投票:-2回答:1

net c#web表单应用程序。当我试图用一个巨大的记录,大约225000条记录填充下拉菜单时,浏览器停止响应。并显示错误

A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.

我该怎么办?这是因为大量的数据?还是其他任何问题?请帮忙..

c# browser
1个回答
0
投票

首先,我不认为正常的下拉列表将是这种数据量的理想用户控件。

显示错误是因为在客户端发生的DOM渲染只花费了很多时间。

如果您仍想使用此控件,则需要为其实现按需加载逻辑。您需要使用实现IScriptControl的类创建新的Dropdown User Control,并且在客户端您可以控制呈现机制。

关于如何做的解释:https://forums.asp.net/t/1503727.aspx?load+on+demand+combobox+

© www.soinside.com 2019 - 2024. All rights reserved.