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...
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...
FTP Upload File Using Only .NET Framework 2013-01-10 19:18 UTC .NET C# FTP Here an example of how to upload a file to a FTP-server, using the class FtpWebRequest, which is included in the .NET Framework. All you need to do is...