How do use 'input type="Submit" OnServerClick=' from codebehind
<p>Troubleshooting an IIS Session State problem I found a simple page to use as a test. This page works.</p>

<pre><code>&lt;body&gt;
&lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
        &lt;input type="text"
        id="text1"  
        runat="server"
        /&gt;
        &lt;input type="Submit"
        id="Submit1" 
        OnServerClick="Session_Add" 
        value="Add to Session State" 
        runat="server"
            /&gt;
        &lt;input type="Submit"
        id="Submit2"  
        OnServerClick="CheckSession" 
        value="View Session State" 
        runat="server" 
        /&gt;
        &lt;hr size="1"/&gt;
        &lt;font size="6"/&gt;&lt;span id="span1" runat="server"/&gt;
    &lt;/div&gt;
&lt;/form&gt;
&lt;script language="C#" runat="server"&gt;
    void Session_Add(Object sender, EventArgs e)
    {
        Session["MySession"] = text1.Value;
        span1.InnerHtml = "Session data updated! &lt;P&gt; Your session contains: &lt;font color=red&gt;" +
                    Session["MySession"].ToString() + "&lt;/font&gt;";
    }

    void CheckSession(Object sender, EventArgs e)
    {
        if (String.IsNullOrEmpty(Session["MySession"].ToString()))
        {
            span1.InnerHtml = "NOTHING, SESSION DATA LOST!";
        }
        else
            span1.InnerHtml = "Your session contains: &lt;font color=red&gt;" +
                     Session["MySession"].ToString() + "&lt;/font&gt;";
    }
&lt;/script&gt;
</code></pre>

<p></p>

<p>For no particular reason other than I wanted to do it that way, I tried moving the part in the script block to a codebehind file. That code follows:</p>

<pre><code>        protected void Page_Load(object sender, EventArgs e)
    {
        Submit1.ServerClick += new System.EventHandler(this.Session_Add);
        Submit2.ServerClick += new System.EventHandler(this.CheckSession);


    }

    void Session_Add(Object sender, EventArgs e)
    {
        Session["MySession"] = text1.Value;
        span1.InnerHtml = "Session data updated! &lt;P&gt; Your session contains: &lt;font color=red&gt;" +
                    Session["MySession"].ToString() + "&lt;/font&gt;";
    }

    void CheckSession(Object sender, EventArgs e)
    {
        if ( String.IsNullOrEmpty(Session["MySession"].ToString())) 
        {
            span1.InnerHtml = "NOTHING, SESSION DATA LOST!";
        }
        else
            span1.InnerHtml = "Your session contains: &lt;font color=red&gt;" +             
                     Session["MySession"].ToString() + "&lt;/font&gt;";
    }

}
</code></pre>

<blockquote>
  <p>Compiler Error Message: CS1061: 'ASP.webform1_aspx' does not contain a definition for 'Session_Add' and no extension method 'Session_Add' accepting a first argument of type 'ASP.webform1_aspx' could be found (are you missing a using directive or an assembly reference?)</p>
</blockquote>

<p>What would I have to do to make this work?</p>
