我有这个 _Layout.cshtml
<body>
<div id="wrapper">
<div id="header-wrapper">
<div id="header">
<div id="logo">
//SOME LOGO LOGIC
</div>
</div>
<div id="menu-wrapper">
//SOME MENU LOGIC
</div>
<!-- end #menu -->
<div id="banner">
<div id="slider"> <a href="#" class="button previous-button"><</a> <a href="#" class="button next-button">></a>
<div class="viewer">
<div class="reel">
<div class="slide">
<h2>Stallen..</h2>
<p>Her kan du skrive noe tekst</p>
<a class="link" href="~/horse/riversidestar">Full story ...</a><img src="~/images/img01.jpg" width="900" height="350" alt="" /></div>
<div class="slide">
<h2>Riverside Star i naturen</h2>
<p>Her kan du skrive noe tekst</p>
<a class="link" href="~/horse/riversidestar">Full story ...</a><img src="~/images/img02.jpg" width="900" height="350" alt="" /></div>
</div>
</div>
<div class="indicator">
<ul>
<li class="active">1</li>
<li>2</li>
</ul>
</div>
</div>
<script type="text/javascript">//SOME SCRIPT</script>
</div>
</div>
<div id="page">
<div id="content">
@RenderBody()
</div>
<div id="sidebar-bg">
<div id="sidebar">
<h2>Nyheter</h2>
@{Html.RenderAction("ShortNewsList", "News");}
</div>
</div>
<div style="clear: both;"> </div>
</div>
现在,它只有在每个视图上都不同的 renderBody 部分。当我进入不同的视图时,如何使用 id=banner 更改 DIV 的内容
当我尝试将它添加到另一个视图中时,它当然会在布局中非常错误