title: How to Call a function from a class in Visual Studio Solution
body: <p>Now to working with Visual Studio Solutions, but I am trying something very basic but no joy.</p>
  
  <p>So in my project I have a folder App_Code and in this I added a class called Test.vb</p>
  
  <p>and added a simple function</p>
  
  <pre><code>Public Class Test2
  Public Function ReplaceXSS(ByVal InputString As String) As String
      InputString = InputString.Replace("&lt;script&gt;", "")
      InputString = HttpUtility.HtmlEncode(InputString)
      InputString = InputString.Replace("&lt;/script&gt;", "")
      InputString = InputString.Replace("&amp;", "&amp;#38;")
      InputString = InputString.Replace("&lt;", "&amp;#60;")
      InputString = InputString.Replace("&gt;", "&amp;#62;")
      InputString = InputString.Replace("%", "&amp;#37;")
      InputString = InputString.Replace("|", "&amp;#124;")
      InputString = InputString.Replace("$", "&amp;#36;")
      InputString = InputString.Replace("'", "&amp;#39;")
      InputString = InputString.Replace("""", "&amp;#92;")
  
      ReplaceXSS = InputString
  End Function
  </code></pre>
  
  <p>End Class</p>
  
  <p>But in my Default.aspx page I am struggling to find the correct syntax to call this method.</p>
  
  <p>Also it doesnt seem like my Test2.vb class is correctly included in the project because If I make a type the project still builds successfully when it shouldnt</p>