Creating a JavaScript application on top of ASP.NET MVC is becoming more common these days. Rightfully so, especially with the new Web API addition to MVC 4. The clear separation between client-side and server-side is an elegant architecture indeed!
Get an Absolute URL from a Relative Path in C# .NET
Getting an absolute path from a relative one has been made very easy and pleasant by .NET. Just feed the relative path to the “Page.ResolveUrl” method and that’s it! One thing that was left out by .NET though is how to get an absolute URL from a relative path? With social networks on the rise, passing around your links has become more important than ever. There are many ways to do this, but all have their drawbacks. I will show you a static method that I use that solves just about all cases.