Month: September 2015

Footer from database in MVC ASP.NET

I've been struggling for a while to find a sensible way of getting the footer. Well... This is where partial views come useful. There are several ways to solve this problem. I've created a controller:

In the Shared folder I've added _FooterPartial.cshtml and in the layout this line:

It worked so awesome.

Continue Reading

Partial View not being published

I encountered a bit of a problem today. I've added a partial view manually to the project (i.e. it wasn't generated by the VS). To my annoyance, when I deployed the application to the test server the *.cshtml was not copied. After a bit of digging around, I found the problem. It turned out that

Continue Reading