zoukankan      html  css  js  c++  java
  • 升级

    1. 类库迁移

      直接拷贝到netcore 类库下,修改命名空间即可;

    2. 迁移包(不同项目需要迁移的包不一下)

      using System.Web.Script.Serialization;  ---》using Nancy.Json;

     3. Action 跳转

      View 写法: 

     @await Component.InvokeAsync("IndexMapSpot", new { PageType = "show_page" })
     // @*@{Html.Action("IndexMapSpot", "Matrix", new { PageType = "show_page" });}*@
    

      定义实现IndexMapSpotViewComponent

    namespace Techub.QHNY.Web.Components
    {
        public class IndexMapSpotViewComponent : ViewComponent
        {
            /// <summary>
            /// 
            /// </summary>
            /// <param name="data"></param>
            /// <returns></returns>
            public IViewComponentResult Invoke(string PageType = "", string from = "0")
            {
                ViewBag.page = PageType;
                ViewBag.from = from;
                return View("~/Views/Matrix/IndexMapSpot.cshtml");
            }
        }
    }
    

      

    4. JsonResult 数据

      

     

     5. @Scripts @Styles

      改成具体的文件链接,参考项目默认的layount

      <link href="~/Content/bundles.min.css" rel="stylesheet" />
    
      <script src="~/Scripts/bundles.min.js"></script>
    

    6. 静态文件脚本

      

  • 相关阅读:
    程序员学习提高必看的一篇文章
    SpringAOP拦截器的代理机制
    springboot03_RabbitMQ
    Docker_02
    Docker_01
    Redis_02
    Redis_01
    关于Linux下内存和Swap
    密码学DAY2
    密码学DAY1_02
  • 原文地址:https://www.cnblogs.com/ctfyfd/p/13742922.html
Copyright © 2011-2022 走看看