Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC @RenderPage not working

Tags:

c#

asp.net-mvc

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 -->
like image 638
Hadi Barak Avatar asked Oct 15 '25 09:10

Hadi Barak


1 Answers

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

like image 150
chsword Avatar answered Oct 17 '25 00:10

chsword



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!