Hello I want to return an anchor from Mvc Controller
Controller name= DefaultController;
public ActionResult MyAction(int id)
{
return Redi
Great answer gdoron. Here's another way that I use (just to add to the available solutions here).
return Redirect(String.Format("{0}#{1}", Url.RouteUrl(new { controller = "MyController", action = "Index" }), "anchor_hash");
Obviously, with gdoron's answer this could be made a cleaner with the following in this simple case;
return new RedirectResult(Url.Action("Index") + "#anchor_hash");