title: Calling Class from another File ASP.NET VB.NET
body: <p>Lets say I have a class like this in class1.vb:</p>
  
  <pre><code>Public Class my_class
    Public Sub my_sub()
     Dim myvar as String
     myvar = 10
     Session("myvar") = myvar
    End Sub
  End Class
  </code></pre>
  
  <p>Then I have a ASP.NET page with a code-behind file, default.aspx and default.aspx.vb and I want to call my_class. I'm doing the following, but it doesn't work:</p>
  
  <pre><code>Imports my_app.my_class
  Partial Public Class _default
     Inherits System.Web.UI.Page
   Protected Sub Page_Load(ByVal sender as Object, ByVal e as System.EventArgs) Handles Me.Load
     my_class()
   End Sub
  End Class
  </code></pre>
  
  <p>I get a "Reference to a non-shared member requires an object reference"</p>