How can I get the last accessed ‘Action’ in a asp.net mvc app.
Example I have a menuItem called ‘Add to Favourites” when clicked is navigated to a page in which I need to populate a textbox with this url
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no built in mechanism to do this. What I would do, is populate your Add To Favourites url, like so:
Create an extension method to encode the current url:
Then wire up your action:
Make sure you have a route:
And then you can use the helper in your menu:
Hope that helps?