Passing Data to a Layout Page
问题 I have a layout page that has variables that need to be filled. Example: @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> I don't want to populate this in every ActionResult . Is there a way to pass data to a layout page once and do it for all instances? 回答1: OK since you want this to be set once you can make use of a