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
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
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.
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")