Tony
Tony

Reputation: 12695

MVC 3 How to get the last browser history entry?

when an user enters on a View, from the WebBrowser he can goes back to the previous page by clicking the WebBrowser's back button.

Is it possible to get that back URL when entering on that View ?

I want to assign that URl for one of the buttons on that View. Any ideas ?

Upvotes: 2

Views: 1101

Answers (1)

marapet
marapet

Reputation: 56466

You may use UrlReferrer of the request:

Request.UrlReferrer

This property returns the value of the Http referer value sent with the request, which is not guaranteed to be correct or even there - some browsers and tools enable you to block them.

Upvotes: 5

Related Questions