I Have the following code but it gives an error message:
var url = (string) Session["CurrentUrl"];
if (url != null)
{
var ip = new Uri(url);
var ipNoPort = string.Format("{0}://{1}/{2}", ip.Scheme, ip.Host, ip.PathAndQuery);
return RedirectResult(ipNoPort);
}
return View();
The error points to RedirectResult saying Error 1 ‘System.Web.Mvc.RedirectResult’ is a ‘type’ but is used like a ‘variable’
I think you’re confusing it with
Which is a member of the controller.