方法一 Controller 部分代码: public ActionResult Modify(int id) { //3.1.1 检查id //3.1.2根据id查询数据 Models.Student stu = (from s in db.Students where s.Id == id select s).FirstOrDefault(); //方法一.查询班级数据,并 做成 下拉框 选项集合 //List<Models.Class> listClass = (from c in d
后台代码: public class DropController : Controller { // GET: Drop public ActionResult Index() { List<Province> list = new List<Province> { new Province{ Id=1,name="山西省"}, new Province{ Id=1,name="广东省"}, new Province{ Id=1,name=