1
我有一個項目,我已經有veiwmodel分配的IEnumerable <int>到hiddenfor
[Required(ErrorMessage = "Enter Title")]
[Display(Name="Title")]
public string Title { get; set; }
[Required(ErrorMessage = "Enter Description")]
[Display(Name="Description")]
public string Description { get; set; }
[Required(ErrorMessage = "Select Site")]
[Display(Name = "Site")]
public string Site { get; set; }
[Required(ErrorMessage = "Upload File is required")]
[Display(Name = "Upload File")]
[ValidatePlanFile]
public HttpPostedFileBase File { get; set; }
public int SelectedUser { get; set; }
public List<Guid> Users { get; set; }
我需要的用戶屬性分配給一個hiddenfor工作。
是否可以將IENumerable分配給視圖?