1.新建aspx文件
2.在控制器中访问aspx页面
public class HomeController : Controller { // // GET: /Home/ public ActionResult Index() { DbContextBase db = new DbContextBase(); var list=db.ServiceCategoryNavTBs.ToList(); return View(); } public ActionResult Report() { string aspx = "/AspNets/RdlcView.aspx"; using(var sw=new StringWriter()) { System.Web.HttpContext.Current.Server.Execute(aspx, sw, true); return Content(sw.ToString()); } } }