标签: asp.net-mvc razor
我有查看“child.cshtml”继承自“_Parent.cshtml”,在_Parent.cshtml上我有:
ViewBag.Title = "some value";
在child.cshtml上我有:
@{ Layout = "_Parent.cshtml"; } <h1>Here i want to put layout title</h1>
如何从Parent.cshtml访问child.cshtml视图中的ViewBag.Title值?