Url does not change in display when redirecting
action: User/Details View: Details
In my 'Details' view, a user can click on an actionlink that goes to the action :User/UserBe开发者_如何学运维havior From which I again return a "Details" View.
the url shows http://User/UserBehavior
If I return redirectToAction to the Details action, I still get the "UserBehavior" action in the url.
how do I redirect and present the new url of the action? isnt that the way its supposed to be?
TO CLARIFY: WHEN YOU USE REDIRECTTOACTION, SHOULD THE URL IN THE BROWSER SHOW THE ORIGINAL ACTION OR THE ACTION YOU REDIRECTED TO?
I think the problem comes from posting back where the url is the same but internally you transfer to another view. The solution would be to redirect and hopefully there is an MVC feature for that. Use RedirectToAction("UserBehaviour"), I hope it solves your problem.
精彩评论