Using A Static Class In MVC3
How do I reference a static class in my MVC3 project?
A simple question which actually has a very simple answer, but finding that answer may not be too simple. In Web Forms we are used to putting these things in the App_Code folder. Sure you can create one in MVC3 but it doesn’t work like Web Forms.
I remembered a video I watched, probably by John Papa, that mentioned using a Helpers folder. Sure it was for Silverlight but hey, MVC has helpers too. So I tried that and it worked! Now keep in mind that you don’t have to name it Helpers. Just create a normal folder, give it a meaningful name and stick your stuff in there. Just like you do with Controllers, Models, and Views. Also note that you can add a using to the top of the page where you are referencing it (sorry, I’m a C# guy, I’ve not done VB since VB5 or VB6).
great post