title: VB.Net: call sub from shared sub
body: <p>I have some Ajax on a web page that feeds some data to a server-side VB.Net method.  Once that data is in the server-side method, I need to call another server-side method to use the data I just collected.  Here is a really simplified example:</p>
  
  <pre><code>' This method gets the input from the Ajax code on the web page.
  &lt;System.Web.Services.WebMethod&gt; _
  Public Shared Sub GetAwesome(VBInputText As String)
      Dim strTest As String = VBInputText
      ' Now that we have collected input from the user, 
      ' we need to run a method that does a ton of other stuff.
      DisplayAwesome(VBInputText)
  End Sub
  
  Protected Sub DisplayAwesome(AwesomeIn As String)
      ' The real app does a lot more than this.  For this example, it 
      ' just sets the text of a literal.
      litAwesomeResult.Text = AwesomeIn
  End Sub
  </code></pre>
  
  <p>Of course, in the above example <code>DisplayAwesome(VBInputText)</code> gives me the 'Cannot refer to an instance member...' error.  So, is it possible now to call <code>Protected Sub DisplayAwesome</code> from <code>Public Shared Sub GetAwesome</code>?  I'm hoping to stay close to this sort of solution because it would play very well with the app as it is already written by another coworker.</p>