[英]What's the ideal method for populating a drop down list via AJAX (AJAJ?) in razor/jquery?
So I've got this @Html.DropDownList("Thangs")
inside of a hidden div. 所以我在隐藏的div里面得到了这个
@Html.DropDownList("Thangs")
。 When the user clicks a link to expose the div, I want to make an AJAX call to grab the things that should be in the list. 当用户单击链接以显示div时,我想进行AJAX调用以获取应该在列表中的内容。 It will be returned as JSON.
它将作为JSON返回。 How would I bind the incoming JSON objects as name/values into the DropDownList using jQuery?
如何使用jQuery将传入的JSON对象作为名称/值绑定到DropDownList中?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.