public ActionResult Index(string id)//主页 //参数string searchString 访问方式为index?searchString=xxxx .参数string id 访问方式为index/x { string searchString = id; //return View(db.Books.ToList()); //返回一个对象集合 var s = from m in db.Books select m; //查询所有数据 if (!string…
public ActionResult InfoFrame() { List<Users> list = new List<Users>(); Users user = new Users(); if (Session["UserID"] == null)//判断是否没登录 { return RedirectToAction("LoginIndex", "Login"); } else { string sql = str…