How to redirect user to another page from view after it was loaded is ASP .NET MVC?
- by Dmytro Tsiniavsky
For example I have some view with action link:
@Html.ActionLink("Action", "Controller")
Action action returns some view:
public ActionResult Action()
{
string someModelForView = "some url i need to redirect after view was fully loaded";
return View("SomeView", someModelForView);
}
What I need is to redirect user to url, defined in someModelForView model after view was fully loaded, and all javascripts on this page were executed. This view might be empty, without any content, I just need to execute some javascript, and after that redirect user to external page. How can accomplish that?