Hi Guys,
I was trying to list of values from Action, but the action always get null value.
my cshtml
Action :
I was trying to list of values from Action, but the action always get null value.
my cshtml
<
div
class
=
"form-group"
>
@Html.LabelFor(m => m.OrganizationName, new { @class = "col-md-4 control-label" })
<
div
class
=
"col-md-4"
>
@Html.Kendo().AutoCompleteFor(m => m.OrganizationName)
.MinLength(3).Name("OrganizationName")
.DataSource(s => { s.Read(r => { r.Action("FindVets", "General"); }); })
.DataTextField("Name")
.HtmlAttributes(new { @class = "form-control" })
</
div
>
</
div
>
Action :
public JsonResult FindVets(string OrganizationName)
{
var Vets = General.GetRegularVet();
var a = (from v in Vets
where v.Name.ToUpper().Contains(OrganizationName.ToUpper())
select v).ToList();
return Json(a, JsonRequestBehavior.AllowGet);
}