How to get textbox value in javascript
<p>I have this in the aspx.cs page and trying to get the value of the text box in my js function. This is not working:</p>

<pre><code>result += result.Replace(sOptionText.ToString(), "&lt;input type='text' id=\"txtSS_" + Version + "\" size='10' value=\"" +"\" runat = \"server\" style=\"display:none;\"  /&gt;");
</code></pre>

<p>My js function is here:</p>

<pre><code>var sOptionList = "";

var $obj = $('#txtSS_' + VersionID);
if ($('#txtSS_' + VersionID).length &gt; 0)
    sOptionList = $obj.val(); 
</code></pre>

<p>I am getting a null value. What am I doing wrong?
Also, wanted to know if my textbox declaration in .cs page is correct. It still shows that the value="" when I firebug it. </p>
