Hi, I want to change an ASP.NET variable when someone clicks on a link on the page. Specifically a Session["something"] variable. That means I should do it after postback, but I am new to whole web development and the ASP.NET MVC specifically, so I know just an overloaded action with some [Accept] attribute. Since this link is on the master site, I can imagine only to add such an action to each action existing and that seems pretty unfortunate. Javascript doesn't have access to ASP.NET variables, so I am pretty lost.
This action link should be for almost every action and I don't know, how to recognize, whether it has been accesses by this spoecific or some other link (which is important to me). That implies some postprocessing, something like
<a href="" onclick="<% Session["location"] = new_value %>" >
Any ideas? Piece of code?
Thanks in advance.