var ss = Server.MapPath(""); //C:\Users\Administrator\Desktop\Csharp测试程序\TestMVC\TestMVC ss = ss + "/bin/index.html"; using (StreamReader sr = new StreamReader(ss, System.Text.Encoding.GetEncoding("gb2312"))) //以gb2312编码方式读取
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