<div class="welcome">
<asp:ContentPlaceHolder runat="server" ID="FeaturedContent" />
<div style="margin: 10px 0;">
<asp:ContentPlaceHolder runat="server" ID="MainContent" />
</div>
<!-- etc -->
</div>
I have master page in asp.net project which have two content place holder? Now i am trying to create. this project in MVC how to to take two content place holder in _Layout.cshtml. So at derived page i can put my content's in between this.
Razor also supports the ability to add additional "named sections” to layout templates as well. These sections can be defined anywhere in the layout file (including within the section of the HTML), and allow you to output dynamic content to multiple, non-contiguous, regions of the final response.
Read below link : http://weblogs.asp.net/scottgu/archive/2010/12/30/asp-net-mvc-3-layouts-and-sections-with-razor.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With