Cannot refer to an instance member of a class from within a shared method 
<p>I have a public shared function and I'm trying to access the values of a text box and a session variable.</p>

<p>I'm getting the error "Cannot refer to an instance member of a class from within a shared
method or shared member initializer without an explicit instance of
the class."</p>

<p>Is there any way I can get to the values in the textboxes or session variables from within the method?</p>

<p>Thanks,</p>

<pre><code>&lt;WebMethod()&gt; _
Public Shared Function savenote() As String
    Dim newnote As New note()
    newnote.callID = txtRef.Text
    newnote.LoggedBy = Session("user_id")
    newnote.Note = txtNote.Text
    newnote.Create()
    Return 1
End Function
</code></pre>
