/// <summary> /// 传值 /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Update(int id) { Login_Info match = User_dal.details(id); ViewBag.Rolename = User_dal.Roleslist().Select(r => new SelectListItem() { Text = r.Rolename, Value = r.Roleid.ToString() } ).ToList(); return(View(match)); }