How to desable and Enable TextBox acording to checklbox
<pre><code>&lt;asp:CheckBox ID="htmlChkNotify" runat="server" OnCheckedChanged="ToggleTextBox(this,'htmlTxtNotifyemailaddress')" /&gt;  
&lt;asp:TextBox ID="htmlTxtNotifyemailaddress" runat="server" Enabled="false"&gt;&lt;/asp:TextBox&gt;  
</code></pre>

<p>function ToggleTextBox(CheckBox, TextBoxID) {</p>

<pre><code>     var TextBox = document.getElementById(TextBoxID);  
     if (CheckBox.checked) {  
         TextBox.disabled = false;  
         TextBox.value = "";  
     }  
     else {  
         TextBox.disabled = true;  
         TextBox.value = "";  
     }  
 } 
</code></pre>

<p>i have write like but when i run the code then error message comeing " can't be pass this literal" something like that </p>

<p>so how can i do it ?</p>

<p>actually u can also see demo in stackover flow "Notify daily of any new answers" i want to fire event like.</p>

<pre><code>                                               Thank U
</code></pre>
