Using Constants in Razor Views

It is very easy when creating a website to fall into the trap of duplicating small bits of information throughout your site.  It may seem expedient to hard-code something like your phone number or email in your views, especially initially when you may only reference it in one or two places. However, once you start […]

Adding Custom Namespaces to Razor Views

I’ve recently been working on a new web site using ASP.net MVC5, and I wanted to be able to reference my view models from my Razor views without having to fully qualify their namespace. Since I keep my view models in their own ViewModels namespace, all I needed to do was add that to the […]