私はRazor構文と最新のTelerikコンポーネントでAsp.Netを使用しています。残念ながら、ドロップダウンボックスをクリックすると何も表示されませんが、VSデバッガーは_AjaxLoaidingメソッドを実行したことを示します。この謎をどのように解決できますか(つまり、DropDownListにデータをロードする)?
これは私のコントローラーの一部です:
public ActionResult _AjaxLoading(string text) {
var product = new Dictionary<string, string>();
product.Add("a","b");
return new JsonResult { Data = new { Text = "Abc", Value = "123", Produtcs = new SelectList(product, "ProductID", "ProductName") } };
}
これは私の見解の一部です:
@{Html.Telerik().DropDownList()
.Name("documentType").Enable(false)
.HtmlAttributes(new { style = "width:250px;" })
.DataBinding(binding => binding.Ajax().Select("_AjaxLoading", "Applicants"))
.Render();
}