title: how to store a label control text into a textbox control value
body: <p>i am trying to set the value of a textbox control in my aspx page as the value of a label text. I am using the following code but nothing happens. I have tried from the code behind file using c# and then I want to assign the textbox value to a session variable. If I just assign a string value like &quot;Hello&quot;it works, but otherwise nothing works.</p>
  <pre><code>    protected void btnBook_Click(object sender, EventArgs e)
         
       {
  
          txtmtcid.Text = blbtest.Text;
          Session[&quot;mtcid&quot;] = txtmtcid.Text;
          //Response.Redirect(&quot;booknow.aspx&quot;);
      }
      }
  </code></pre>
  <p>I also tried with Javascript, but no use:</p>
  <pre><code>    var mtcid = parsedData.employeeCode;
  
     document.getElementById('txtmtcid').value = mtcid;
  </code></pre>
  <p>The above js code works fine if I am assigning the value of mtcid to a label text, but not for the text box. please help.</p>