public ActionResult KeywordContact() { string keyword = Request["key"] ?? ""; string type = Request["type"] ?? "content"; if (!string.IsNullOrEmpty(keyword)) { function.WriteErrMsg("未指定关键字"); return(Content("")); } PageSetting setting = new PageSetting(); switch (type) { case "content": //文章信息 setting = conBll.SelPageByTagkey(CPage, PSize, Request["tagkey"], Request["key"]); ViewBag.action = "content"; break; default: //商品信息 setting = proBll.SelPageByKayword(CPage, PSize, Request["tagkey"], Request["key"]); ViewBag.action = "commodity"; break; } return(View(setting)); }