 <p>You can use the <code>HttpRequest.UrlReferer</code> property. Create the single action in some controller:</p> <pre><code>public class SomeController : BaseController { public ActionResult Change(int value) { Session["Value"] = value; return Redirect(Request.UrlReferer.ToString()); } } </code></pre>