Carnation Flowers

Carnation Flowers

  • NA
  • 493
  • 35.8k

passing values from viewbag to view and draw it in checkboxl

Apr 10 2018 2:47 AM

i get values from view bag in asp controller and want to pass it in view using checkboxlist

enter code here  void BindChecklistbox()     {         MenueBussince _mn = new MenueBussince();         var mn = _mn.GetAll();         ViewBag.mnId = new SelectList(mn, "ID", "NameAr");     }ode here 

  @foreach (var item in ViewBag.mnId)                         {         <input type="checkbox" name="@item.NameAr [email protected] />                             }