Hi,
I have the following dropdown lists declared in my view:
<p>
<label for="ApplicationName">Application:</label>
@(Html.Kendo().DropDownList().Name("ApplicationNames")
.BindTo(new SelectList(ViewBag.Applications)))
</p>
<p>
<label for="Roles">Roles:</label>
@(Html.Kendo().DropDownList().Name("Roles")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetRoles", "Membership")
.Data("filterRoles").Type(HttpVerbs.Post) ;
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("ApplicationNames"))
<script>
function filterRoles() {
return {
ApplicationNames: $("#ApplicationNames").val()
};
}
</script>
</p>
and my controller action :
public class MembershipController : Controller
{
MembershipModel model = new MembershipModel();
[HttpPost]
public JsonResult GetRoles(string ApplicationNames)
{
List<String> roles = model.GetRolesForApplication(ApplicationNames);
return Json(roles);
}
but my GetRoles action never fires. Any ideas ?
I have the following dropdown lists declared in my view:
<p>
<label for="ApplicationName">Application:</label>
@(Html.Kendo().DropDownList().Name("ApplicationNames")
.BindTo(new SelectList(ViewBag.Applications)))
</p>
<p>
<label for="Roles">Roles:</label>
@(Html.Kendo().DropDownList().Name("Roles")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetRoles", "Membership")
.Data("filterRoles").Type(HttpVerbs.Post) ;
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("ApplicationNames"))
<script>
function filterRoles() {
return {
ApplicationNames: $("#ApplicationNames").val()
};
}
</script>
</p>
and my controller action :
public class MembershipController : Controller
{
MembershipModel model = new MembershipModel();
[HttpPost]
public JsonResult GetRoles(string ApplicationNames)
{
List<String> roles = model.GetRolesForApplication(ApplicationNames);
return Json(roles);
}
but my GetRoles action never fires. Any ideas ?