Read asp.net dynamic textbox content length using c#
<p>I am using the below code to create a dynamic textbox and their onchange event.Event fired successfully and it doesn't return any value.Please help me to solve this.</p>

<pre><code>txt_box.Attributes.Add("onchange", "loadValues('" + txt_box.ClientID + "')");

 function loadValues(controlName) {
        alert(controlName);
        //control name comes here
        var txtValue = document.getElementById(controlName);
       //control also return null
        if (txtValue.value.length &gt; 0)
        {
          alert(txtValue.value.length); 
        }
 }
</code></pre>
