model
public class OModel
{
public IEnumerable<REF_OTRASLEVAYA_PRENADLEGNOST> RefOtraslevayaPrenadlegnost { get;set; }
public int OTRASL_ID { get; set; }
}
html
@model OModel
@Html.Kendo().DropDownListFor(m => m.OTRASL_ID).Name("Otraslevaya").DataTextField("Text").DataValueField("Value").BindTo(Model.RefOtraslevayaPrenadlegnost)
control
public ActionResult Update()
{
return View(new OModel{RefOtraslevayaPrenadlegnost=dataManager.RefOtraslevayaPrenadlegnosts.GetRefOtraslevayaPrenadlegnosts());
}
[HttpPost]
public ActionResult Update(Model model)
{
int i = model.OTRASL_ID // =0 ?????????????
return View(model);
}
when I select a value in DropDoschnListFor nazhimatyu and submit, then the selected value does not come to the server. Why?
public class OModel
{
public IEnumerable<REF_OTRASLEVAYA_PRENADLEGNOST> RefOtraslevayaPrenadlegnost { get;set; }
public int OTRASL_ID { get; set; }
}
html
@model OModel
@Html.Kendo().DropDownListFor(m => m.OTRASL_ID).Name("Otraslevaya").DataTextField("Text").DataValueField("Value").BindTo(Model.RefOtraslevayaPrenadlegnost)
control
public ActionResult Update()
{
return View(new OModel{RefOtraslevayaPrenadlegnost=dataManager.RefOtraslevayaPrenadlegnosts.GetRefOtraslevayaPrenadlegnosts());
}
[HttpPost]
public ActionResult Update(Model model)
{
int i = model.OTRASL_ID // =0 ?????????????
return View(model);
}
when I select a value in DropDoschnListFor nazhimatyu and submit, then the selected value does not come to the server. Why?