Question: I know i can do this

```
var nv = HttpUtility.ParseQueryString(req.RawUrl);

```

But is there a way to convert this back to a url?

```
var newUrl = HttpUtility.Something("/page", nv);

```

Answer: 
Actually, you should encode the key too, not just value.

```
string q = String.Join("&",
nvc.AllKeys.Select(a => $"{HttpUtility.UrlEncode(a)}={HttpUtility.UrlEncode(nvc[a])}"));

```
This did the trick for me:

```
public ActionResult SetLanguage(string language = "fr_FR")
        {            
            Request.UrlReferrer.TryReadQueryAs(out RouteValueDictionary parameters);            
            parameters["language"] = language;            
            return RedirectToAction("Index", parameters);            
        }

```