public ActionResult Add(web info) { WebManager list1 = new WebManager(); int userID = ((User)(Session["User"])).UserId; DateTime ss = System.DateTime.Now; //webId, UserId, web_typeID, webHead, webResult, webtime, like, ReplayTypeID, web_Condition web ds = new web() { UserId = userID, web_typeID = info.web_typeID, webHead = info.webHead, webResult = info.webResult, webtime = ss, like = 0, ReplayTypeID = info.ReplayTypeID, web_Condition = info.web_Condition }; bool list = list1.Add(ds); if (list) { return(Redirect("/LiaoWeiYing/Home/Index")); } else { return(Content("发布失败")); } }