public ActionResult GoodsBuyCondition() { if (Request.IsAjaxRequest()) { string show = "<option value=\"0\">--请选择新旧程度--</option>"; var list = publishService.GoodsConditions(); var json = from p in list select string.Format("<option value=\"{0}\" extend=\"{1}\" message=\"{2}\" >{3}</option>", p.GoodsConditionId, p.IsHasMessage.ToString().ToUpper(), p.PlaceHolder, "至少" + p.GoodsConditionName); return(Json(show + string.Join("", json), JsonRequestBehavior.DenyGet)); } else { return(new ContentResult() { Content = "Access Forbidden!" }); } }