We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
自动完成有两种类型:
静态自动完成适用于不会给页面加载带来太多负担的小型数据集。 Ajax 自动完成功能更适合大型数据集,但会因 Ajax 请求而产生延迟。我的经验是,Ajax 自动完成功能最好使用流行的客户端控件来实现,例如 jQuery UI 自动完成 ,而不是专有的 ASP.NET 控件。原因是流行的客户端控件的兼容性和支持更好,并且您应该能够找到满足您的特定要求的解决方案。使用 ASP.NET 控件,您更有可能独自完成。
也就是说,有 ASP.NET 控件,例如免费的 ComboBox 和 AutoCompleteExtender 附带 ASP.NET AJAX Control Toolkit,以及 Telerik 等商业控件 RadComboBox 和 DevExpress ASPxComboBox。所有这些都适合非 ajax 自动完成,并且比 jquery UI 自动完成更容易填充数据。对于 Ajax 请求,我很难让 Telerik RadComboBox 正常工作,因此切换到 jQuery UI 自动完成。但对于静态数据,我仍然使用RadComboBox和ASPxComboBox。
对于 ASP.NET 组合框控件,需要记住的一件事是,如果启用了 ViewState,则任何较大的数据集都会占用大量空间。回发比页面加载更麻烦,因为用户的上传带宽通常小于下载带宽。在 Telerik RadComboBox 中,我曾经在使用 ajax 按需自动完成时禁用视图状态。
There are two kinds of autocomplete:
Static autocomplete is suitable for small datasets that do not burden the page load too much. Ajax autocomplete is better for large datasets, but imposes a latency due to an Ajax request. My experience is that Ajax autocomplete is best implemented with a popular client-side control, such as jQuery UI autocomplete, instead of a proprietary ASP.NET control. The reason is that compatibility and support are better for popular client-side controls, and you should be able find solutions to your particular requirements. With ASP.NET controls, you are more likely to end up on your own.
This said, there are ASP.NET controls such as the free ComboBox and AutoCompleteExtender that come with ASP.NET AJAX Control Toolkit, and commercial controls like Telerik RadComboBox and DevExpress ASPxComboBox. All are good for non-ajax autocomplete, and easier to populate with data than jquery UI autocomplete. With Ajax requests, I had trouble getting Telerik RadComboBox work without trouble, and switched to jQuery UI autocomplete. But with static data, I still use RadComboBox and ASPxComboBox.
One thing to remember with ASP.NET combobox controls is that ViewState takes a lot of space with any larger datasets, if it is enabled. Postbacks make more trouble than page loads, since users have usually less upload bandwidth than download bandwidth. With Telerik RadComboBox, I used to disable viewstate when using ajax on-demand autocomplete.
我建议使用 jQuery UI 的自动完成控件:
如果您对 jQuery UI 控件不满意,还有许多其他控件自动完成 jQuery 插件可以在此处找到。
I would suggest using jQuery UI's autocomplete control:
If you're unhappy with the jQuery UI control there are dozens of other autocomplete jQuery plugins that can be found here.
检查
这。这可能对你的情况有帮助。
check
this. it may be helpful for your situation.
看一下 Shield UI 的自动完成组合框小部件演示 - 它是一个强大的可用组件适用于纯 JavaScript、ASP.NET 和 ASP.NET MVC。
Take a look at Shield UI's autocomplete combobox widget demo - it is a powerful component available for pure JavaScript, ASP.NET and ASP.NET MVC.