Serialize HtmlString & MvcHtmlString in JSON.NET 2014-03-02 17:44 UTC .NET ASP.NET C# Formatting JSON Serialization The HtmlString-class (and MvcHtmlString) that is and has been used in the ASP.NET-platform, including WebPages, since the introduction of ASP.NET MVC is...
Rewrite Old URLs with Regex into RouteValueDictionary 2014-02-28 07:53 UTC .NET ASP.NET C# Regex Routing Have you ever needed to rewrite/redirect old URLs that have very similar pattern as your new, modern URLs, but want to do it with simple, maintainable code? In...
ASP.NET: Transform Web.config with Debug/Release on Build 2013-02-20 18:10 UTC .NET ASP.NET Visual Studio Web.config Did you ever wish you could run your web application with the Web.config being transformed according to the current Solution Configuration for Debug or Release...
MVC: Get Current Action and Controller in View 2013-01-23 20:31 UTC .NET ASP.NET C# Have you ever needed to know what Action and/or Controller that is currently used in your View? This might be most helpful in an Layout-file, used by another...
Create Human-Readable File Size Strings in C# 2013-01-16 18:23 UTC .NET C# IO After needing functionality in C# for getting a human-readable file-size string I posted a question about it on Stackoverflow, as one does. The accepted answer...