A smart way to handle Return URLs in an MVC environment
问题 A problem I come up against again and again is handling redirection to the previous page after a user runs some action such as clicking a 'Back To ...' link or saving the record they are editing. Previously whenever I have needed to know what page to return to, I would provide a returnURL parameter to my current view. http://blah.com/account/edit/1?returnURL="account/index" This isn't a very clean way of handling this situation, as sometimes the return URL contains parameters such as search