How do you implement auto-complete with ASP.NET, MVC3, and Razor?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You could use jQuery UI Autocomplete control along with an mvc action that returns a JsonResult with the right data
回答2:
This isn't using Razor but translating it from webforms to razor is pretty trivial: http://tpeczek.com/2010/05/jquery-autocomplete-in-aspnet-mvc.html