Header and Footer with ASP. Net C #

0

I'm having trouble separating my code, I made some tests to have separate header and footer but in visual studio I did that I can only have a

asked by anonymous 14.05.2018 / 16:22

2 answers

0

In ASP.NET you do not include pages, as you do in PHP, you have to create a Layout page, which is a complete page, with both Helder and footer, and your page will be a fragment within that Layout page.

    
14.05.2018 / 17:41
-1

You can create a page and then call it with @Html.Partial.

// Uses a view in the current folder with this name // If none is found, search the shared folder @Html.Partial("ViewName") or @Html.Partial("ViewName.cshtml")

    
14.05.2018 / 17:41