How to redirect user to another page from view after it was loaded is ASP .NET MVC?
Posted
by
Dmytro Tsiniavsky
on Stack Overflow
See other posts from Stack Overflow
or by Dmytro Tsiniavsky
Published on 2012-11-09T16:46:37Z
Indexed on
2012/11/09
17:00 UTC
Read the original article
Hit count: 243
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?
© Stack Overflow or respective owner