AjaxRadioList

Declaration:
<% ParentCategory.AjaxRadioList()
       .Url(Page.Url().Action("GetCategories", "Data")); %>
<awe:Ocon runat="server" ID="ParentCategory" />

Data binding

By default it will look for a controller with the same name as it + "AjaxRadioList" and that controller must have a
GetItems
action, but you can also specify
.Url(str)
, the same
url
can be reused by the
AjaxDropdown
and
AjaxCheckboxList
, because they all return a collection of
KeyContent
. Example of AjaxRadioList controller action:
public ActionResult GetCategories()
{
    return Json(Db.Categories.Select(o => new KeyContent(o.Id, o.Name)));
}



By accessing this site, you agree to store cookies on your device and disclose information in accordance with our cookie policy and privacy policy .