Dictionary<string, string> getQueryStringFromURL(string url) { var result = new Dictionary<string, string>(); var uri = new Uri(url, true); var queryStrings = System.Web.HttpUtility.ParseQueryString(uri.Query); foreach (var key in queryStrings.Keys) result.Add(key.ToString(), queryStrings[key.ToString()]); return result; }