The answer is taken from stackoverflow :
I actually don't understand why you need query string.
Without it you can do like this:
return View("ViewName", new { code = "whatever you need" });
If you still need it one of possible ways RedirectToAction method:
return RedirectToAction("ViewName", new { code = "whatever you need" });