Reputation: 478
I am using Asp.net MVC. In the layout page I want to store footer in a file and call it using RenderPage. It looks that everything is OK but when I run the website I get this error:
this is the file tree for project _Footer.cshtml is located in Shared Folder
content for _Footer.cshtml
<div id="copyrights">
<div class="container clearfix">
<div class="col_half">
</div>
</div>
</div><!-- #copyrights end -->
Upvotes: 4
Views: 5150
Reputation: 2062
In ASP.NET MVC you can use
@Html.Partial("_Footer")
or @{Html.RenderPartial("_Footer");}
Upvotes: 6