https://blog.csdn.net/lonestar555/article/details/7046717
MVC页面重定向,主要有以下几种形式:
1.Response.Redirect();方法
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- namespace MvcDemo.Controllers
- {
- [HandleError]
- public class HomeController : Controller
- {
- public ActionResult Index()
- {
- ViewData["Message"] = "欢迎使用 ASP.NET MVC!";
- Response.Redirect("User/News");
- return View();
- }
- public ActionResult About()
- {
- return View();
- }
- }
- }