devo caselle di controllo nella mia forma
asp.net mvc @ Html.CheckBoxFor
ho aggiunto al mio modello
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace CorePartners_Site2.Models
{
public class CareerForm
{
//....
public List<CheckBoxes> EmploymentType { get; set; }
}
}
public class CheckBoxes
{
public string Text { get; set; }
public bool Checked { get; set; }
}
e ha aggiunto alla mia forma
@Html.CheckBoxFor(model => model.EmploymentType, new { id = "employmentType_1" })
@Html.CheckBoxFor(model => model.EmploymentType, new { id = "employmentType_2" })
@Html.CheckBoxFor(model => model.EmploymentType, new { id = "employmentType_3" })
ma io ottenere l'errore
Cosa c'è che non va?
Devo aggiungere che il codice a mia forma? – Heidel
@Heidel Yeah nel modulo – mattytommo
Ho provato, ma ho ottenuto questo [http://i.imgur.com/Q78xcBD.png](http://i.imgur.com/Q78xcBD.png). Cosa c'è che non va? – Heidel