I have a controller in an ASP.NET MVC 5 project that return the result of Redirect(url) where url is a string.
Essentially I have this:
string url = "calendar/addevent";
return Redirect(url);
The result in the browser is loading a URL like this: http://example.com/calendar/addevent#
This is fine in IE, but Chrome scrolls to the bottom of the page looking for an anchor because of the '#'.
Any idea on how to not include the '#' on the end of the URL?
Update 10/21/15
This is being returned from this method in the Account controller found in the template MVC 5 project using single-user authentication:
private ActionResult RedirectToLocal(string returnUrl)
{
if (Url.IsLocalUrl(returnUrl))
{
return Redirect(returnUrl);
}
return RedirectToAction("Index", "Home");
}
The Url.IsLocalUrl is true and, if I debug and read the object returned from Redirect(returnUrl), the URL does not have the '#'. The browser is still somehow getting it though...