title: vb global variable to be accesses by different classes
body: <p>I am new to VB and am working on an asp.net VB web application.</p>
  
  <p>I have a partial class called s_new.aspx.vb which is the vb page behind the page s_new.aspx.</p>
  
  <p>In this page there are a series of select dropdowns, which when selected lead to different options becoming available eg different select boxes appearing and or with different options.</p>
  
  <p>One particular select box accesses a method in a different class (webcontrols).</p>
  
  <p>My problem is that I need the web controls class to change its behavior based on a certain selection made in the s_new.aspx.vb page.</p>
  
  <p>If I was using C# I would create a global variable and use that as a decision maker, but I cant seem to to this in VB.</p>
  
  <p>below is a snippet of the code I am using:</p>
  
  <pre><code>Partial Class s_new
  
      Protected Sub fldSourceofFunds_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles fldSourceofFunds.SelectedIndexChanged
          Select Case fldSourceofFunds.SelectedIndex
              Case 1
                 ####
              Case 2
                 ###
              Case 3
                 do something and set the variable
          End Select
      End Sub
  
  
  
  Partial Class Webcontrols
  
      Private Sub ReloadChildren()
          If (variable from s_new has certain value) Then    
              ResetChildren()
  
              Select Case PaymentMethodValue.ToLower.Trim
                  Case "payment via provider/platform"
                  Case "payment direct from client"
                  Case "payment via provider/platform and payment direct from client"
              End Select
          End if
  
      End Sub
  End Class
  </code></pre>
  
  <p>This is an existing project and I need to minimize the changes I make to the project, eg I am not able to make large changes to the structure to accommodate this change. As I said above, this would be a simple solution in C# and I assume it is simple here to.</p>