I want to redirect to a different view depending on the result of a dataset, but I keep getting returned to the page I am currently on, and can\'t work out why. I drop into
Would be safer to do this.
@{ Response.Redirect("~/Account/LogIn?returnUrl=Products");}
So the controller for that action runs as well, to populate any model the view needs.
Source
Redirect from a view to another view
Although as @Satpal mentioned, I do recommend you do the redirecting on your controller.