title: Newbie ASP.net developer variable persisting across routines
body: <p>I am building an ASP.net webpage for the first time;  I come from a VB.net background building standalone exe apps.  </p>
  
  <p>In my main page that is loaded upon entering user credentials, I allow a user to enter new project data or to reload and edit and then resave a project.  I have the first part done but am perplexed by the reload part. </p>
  
  <p>I have a routine that grabs data from the database and stores various values as variables, e.g.,  Dim projectID as string = "".   The dim is in the top section above any sub routines.  In VB, since it is a module-level variable all routines could use that variable with its assigned value.  What I am seeing is this variable is getting reset to the blank it was in the initialization if I use "projectID" in a routine in which it wasn't assigned. </p>
  
  <p>So why doesn't the variable value persist in different routines?  All sub routines are not private and the variable is at the module level? </p>