zoukankan      html  css  js  c++  java
  • MVC页面重定向'页面跳转

    https://blog.csdn.net/lonestar555/article/details/7046717

        MVC页面重定向,主要有以下几种形式:

       1.Response.Redirect();方法

    [csharp] view plain copy
    1.        
    2.   
    3. using System;  
    4. using System.Collections.Generic;  
    5. using System.Linq;  
    6. using System.Web;  
    7. using System.Web.Mvc;  
    8.   
    9. namespace MvcDemo.Controllers  
    10. {  
    11.     [HandleError]  
    12.     public class HomeController : Controller  
    13.     {  
    14.         public ActionResult Index()  
    15.         {  
    16.             ViewData["Message"] = "欢迎使用 ASP.NET MVC!";  
    17.             Response.Redirect("User/News");  
    18.             return View();  
    19.         }  
    20.   
    21.         public ActionResult About()  
    22.         {  
    23.             return View();  
    24.         }  
    25.     }  
  • 相关阅读:
    第十二周工作总结
    第八周工作总结
    冲刺2
    冲刺1
    用户场景分析
    用户场景分析
    水王在哪
    课堂练习-4个数的和
    《大道至简》第一章读后感
    ELF Format 笔记(三)—— Section Types
  • 原文地址:https://www.cnblogs.com/LuoEast/p/8795145.html
Copyright © 2011-2022 走看看