Curtis Timson

Front End & .NET Developer


How to store razor helpers globally

ASP.NET MVC Razor helpers are a great way of reducing duplicated code by containing code snippets in a View which can then be called multiple times. <div> @DisplayGreeting(“Curtis”) </div> @helper DisplayGreeting(string name) { <span>Hello @name</span> } However what if you… Continue Reading →

Abstract config settings from web.config

In ASP.NET, application settings can be specified in the web.config file such as: <appSettings> <add key=”PostsPerPage” value=”6″ /> <add key=”CookieName” value=”Foo” /> </appSettings> The beauty of this is that you don’t need to edit code to make changes to the… Continue Reading →

© 2017 Curtis Timson — Powered by WordPress

Theme by Anders NorenUp ↑