我有一个layout页面,其中包含需要填充的变量.例:
@ModelType KarateAqua.schoolModel
<html>
<body>
@RenderBody()
<div id="footer">
<div class="content">
<div class="bottom_logo">
<a href="/"><span class="inv">@Model.schoolName</span></a>
</div>
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我不想在每个人中填充这个ActionResult.有没有办法将数据传递到layout页面一次,并为所有实例执行此操作?