我是使用MVC方法的新手。如何在MVC中使用DropDownListfor?我需要从我的主表中获取列表,并将该选项显示在Business Profile对象的Business Premise中。 这是我的ViewModel public class SMEAppViewModel
{
public WP2PBusinessProfile BuisinessProfile { ge
视图模型 public class EmployeeIndexViewModel {
public int selectedDepartment { get; set; }
public IList departments1 { get; set; }
}
控制器动作 List<Department> list = new List<Department>();
lis
不知道我在做什么错,但我的下拉列表不想选择我希望它选择的值。我有以下 控制器动作 // GET: /Contract/Create
public ActionResult Create()
{
var model = new ContractViewModel();
var authors = _authorService.GetAuthors();
var p