I am looking for a way to resolve a relative url the way you would with a page or control instance (MSDN Docs) such as:
Page.ResolveUrl(\"~/common/Error.aspx
This question on SO (ASP.Net: Using System.Web.UI.Control.ResolveUrl() in a shared/static function) looks kind of helpful...Basically, you can use the VirtualPathUtility class which is under the System.Web namespace. There is an additional answer to that question which says to be careful of QueryString parameters, but a solution to that is also provided.
At the same time, Rick Strahl's code is pretty neat!