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"]";