ASP.NET MVC Html.Partial 向另一个页面传递参数

ASP.NET MVC Html.Partial 向另一个页面传递参数

Index.cshtml页面内容:

@Html.Partial("~/Views/PhoneCallCTI/PhoneCallDayList.cshtml"
, new ViewDataDictionary { { "CallMonth", "2022-02" }, { "MobilePhoneNum", "13059000000" } } )

PhoneCallDayList.cshtml页面内容:

var CallMonth = "@ViewData["CallMonth"]";
var MobilePhoneNum = "@ViewData["MobilePhoneNum"]";

 

posted on 2022-08-30 09:31  Jankie1122  阅读(212)  评论(0编辑  收藏  举报