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】

原文地址:https://www.cnblogs.com/thaughtZhao/p/4884495.html