Hadi Barak
Hadi Barak

Reputation: 478

MVC @RenderPage not working

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:

error while calling @RenderPage

this is the file tree for project _Footer.cshtml is located in Shared Folder

enter image description here

content for _Footer.cshtml

<div id="copyrights">

<div class="container clearfix">

    <div class="col_half">

    </div>

</div>

</div><!-- #copyrights end -->

Upvotes: 4

Views: 5150

Answers (1)

chsword
chsword

Reputation: 2062

In ASP.NET MVC you can use @Html.Partial("_Footer") or @{Html.RenderPartial("_Footer");}

Upvotes: 6

Related Questions