title: Will my shared variables loose value? (asp.net vb)
body: <p>I have a class includes.vb that holds some variables (sharing them with other pages) like:</p>
  
  <pre><code>Public Shared pageid As Integer = 0
  </code></pre>
  
  <p>I then have a function that does some work with these variables returning them with values;</p>
  
  <pre><code>Return pageid
  </code></pre>
  
  <p>When I step through the code, the variables have values (while stepping through the function), but when they are returned to the page, they come back null.</p>
  
  <p>Do they loose value everytime a page is loaded?
  Can you suggest an alternative method?</p>
  
  <p>Thanks a lot.</p>