title: Can't call Global.asax function
body: <p>I have a pretty simple: global.asax file:</p>
  
  <pre><code>&lt;%@ Application Language="C#" %&gt;
  &lt;script runat="server"&gt; 
  static class MyClass
  {
     static string MyFunction()
     {
        return("Test ok!");
     }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>But when I try to call it from a web page....</p>
  
  <pre><code>&lt;% Response.Write(MyClass.MyFunction());  %&gt;
  </code></pre>
  
  <p>...I get "Compiler Error Message: CS0103: The name 'MyClass' does not exist in the current context".</p>
  
  <p>What am I doing wrong?</p>
  
  <p>(Note: To make things more difficult, I'm calling this code from c# in an .asp page. To preserve links I mapped the aspx to the asp suffix. And that seems to work for regular c# code in my asp page.)</p>