我正在尝试将 JSON 数据绑定到客户端的 RadioButtonList 中。我知道如何做后面的代码,它工作正常。有人请提供更多详细信息,如何在 VB.NET 中绑定 JSON 数据 RadioButtionList。
rblregions.DataTextField = "Value"
rblregions.DataValueField = "Key"
rblregions.DataSource = items
数据如下:[regions:{regionID:US,regionName:USA}]
主文件
<asp:RadioButtonList ID="rblregions" runat="server">
$.getJSON("Map/loadMySites.aspx?" + query,
function (data) {
if (data.regionid && data.region) {
//I want to bind the data here with RadioButtonList
}
}
);