Trying to get form data into Hash table, then place in session
<p>I'm trying to pass form values through to a page that will use a class to execute a stored procedure.  To get the values from the form to the page, I'm placing all the data into a hashtable.  Once in the hash table, I'm place that into a session.  The challenge is that the data isn't getting into the session.</p>

<p>This is the code for putting the form into the hash table and the session.</p>

<pre><code>public partial class addRegistration : System.Web.UI.Page
{


    //variables for transaction amounts
    public int type = 4;
    public string acsamt = "0";
    public int acscontribution = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        object sessionObject = Session["registration"];
    }
    protected void On_Click(object sender, EventArgs e)
    {
        Hashtable htReg = new Hashtable();
        htReg.Add("sponsor", sponsorName.Text);
        htReg.Add("salutation", salutation.SelectedValue.ToString());
        htReg.Add("contact_fname", contactPerson_fname.Text);
        htReg.Add("contact_lname", contactPerson_lname.Text);
        htReg.Add("street", street.Text);
        htReg.Add("city", city.Text);
        htReg.Add("statecode", statecode.SelectedValue.ToString());
        htReg.Add("zip", zip.Text);
        htReg.Add("email", custemail.Text);
        htReg.Add("phone", phone.Text);
        htReg.Add("invoiceNumber", invoiceNum.Text);
        htReg.Add("regType", type);
        htReg.Add("acsamount", acsamt);
        htReg.Add("acscontribution", acscontribution);
        htReg.Add("player1", p1_name.Text);
        htReg.Add("player2", p2_name.Text);
        htReg.Add("player3", p3_name.Text);
        htReg.Add("player4", p4_name.Text);
        Session["registration"] = htReg;
    }

}
</code></pre>

<p>Here is the other side where I'm getting the data back out of the session.</p>

<pre><code>    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Hashtable htReg = new Hashtable();
            htReg = (Hashtable)Session["registration"];
            dbAction db = new dbAction();
            db.AddRegistration(htReg);
        }
    }
</code></pre>

<p>Is it not possible to accomplish this with a session/hashtable?</p>
