Problems when assigning values via JavaScript to Asp.net labels and then passing via C# session object
<p>I am assigning variables to asp labels via javascript with a simple innerHTML call</p>

<p>example:<br/></p>

<p><code>document.getElementById('labelName').innerHTML = parseFloat(var).toFixed(2);</code></p>

<p><br/>
It appears in the label fine, and I am able to continue to manipulate it via javascript.</p>

<p>I then set it up so that that variable is put into a session object via C# codebehind buttonClick event. </p>

<p>example:<br/></p>

<pre><code>protected void btnConfirm_Click ( object sender, EventArgs e )
{
    Session["sessionName"] = labelName.Text;
}
</code></pre>

<p><br/>
The buttonConfirm_Click method fires it Response.Redirects to another page and populates asp labels with the session object via the c# codebehind page_load method.</p>

<p>example:<br/></p>

<blockquote>
  <p>lblResult.Text = Session["sessionName"].ToString();</p>
</blockquote>

<p><br/>
When doing this, <strong>the label is empty, no errors or 'null'.</strong> I have tried to narrow down the issue by trying various things. When I assign the text explicitly in the c# code behind of the first page and the recieve and assign it to the label on the next page, it shows correctly.</p>

<p>example:<br/></p>

<pre><code>Page 1:
Session["sessionName"].ToString() = "Test";

Page 2:
lblResult.Test = Session["sessionResult"].ToString();
</code></pre>

<p><br/>
I have tried several other things, such as casting the variables in javascript and in the codebehind, and checking to make sure I had runat="server" within each applicable label.</p>

<p>Anyways, is there something here I am missing? Is asp.net unable to detect the changes that javascript has made to the labels? Are there some incompatibility issues when using innerHTML or anything like this that maybe be causing such a thing to occur?</p>

<p>Thanks in advance!</p>
