zoukankan      html  css  js  c++  java
  • MVC传递Model

    @using System.Configuration;
    @using System.Text.RegularExpressions;
    @model Model.NewInfo  // 指定Module的类型
    @{
     
        if (Model == null) { return; }
        var ltChannel = BLL.BLLChannel.Get_Channel_List();
    }

    @section head{
        <title>采集>> @Model.New_Title.Trim()</title> 调用Model的内容
    }

            public ActionResult NewInfo(int id)
            {
                Model.NewInfo newInfo = BLL.BLLNewInfo.Get_NewInfo(id);
                return View(newInfo);//传递newInfo,作为page页的Model
            }

    1.页面get方法传值;

    2.接收端直接写对应的参数;

    3.特殊参数:action会得到路由配置中的action地址;即action是关键字;

    4.参数不安全时使用【validate=false】

  • 相关阅读:
    javaweb学习2
    javaweb学习1
    Java学习17
    python 正则表达式
    python 常用库
    python 常用内置函数
    python 函数高级功能
    python 正则表达式findall
    tcpdump
    安卓软件学习进度_1
  • 原文地址:https://www.cnblogs.com/thaughtZhao/p/4884495.html
Copyright © 2011-2022 走看看