title: ASP.net MVC - request-scoped global variable
body: <p>I have a value which I want to be vaild during a single request. I am not using Session, as this would make the value global for the entire navigation session.</p>
  
  <p>So I have put thie value in a static field of a class. Great, but then I discovered that such fields are even more global, that is, they stay set for the entire application! This means that there could be random interaction among navigation sessions.</p>
  
  <p>So the question is: is there a safe place I can put a global variable, which will be </p>
  
  <ul>
  <li>global throughout the request</li>
  <li>reset after the request is completed</li>
  <li>not affected by any other request, either of the same user or by other users</li>
  </ul>
  
  <p>Thanks
  Palantir</p>
  
  <p>EDIT
  I'll elaborate. I have a piece of code in my master page, which I need to hide on certain conditions, of which I am aware in the controller only. I thought about setting a static variable in the controller, which then would be queried by the master page, but now I see there could be a better way... </p>