更新时间:2023-01-31 21:55:03
您必须通过objList.Name作为参数传递给名称动作,这个动作可以包括在Viewbag名称:
You have to pass the objList.Name as a parameter to the "Name" action, in this action you can include the name in the Viewbag:
ViewBag.MyTitle = nameParameter;
和在名称的观点:
<title>@ViewBag.MyTitle</title>
如果您使用的是布局网页,你只有把这个在名的行动:
If you are using a Layout page, you only have to put this in the "name" action:
ViewBag.Title = nameParameter;
由于在布局视图你可能有这样的:
Because in your layout view you probably have this:
<title>@ViewBag.Title</title>