ASP.Net Javascript integration
<p>I am trying to use the following script in asp.net:</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
    function checktext() {
        var txt = document.getElementById('tbComments');

        if (txt.Text.Length &gt; 0) {
            alert('Thank you for submitting feedback.');

            return true;
        }
        else {
            alert('Sorry, you must enter text before submitting.')

            return false;
        }
    }
&lt;/script&gt;


    &lt;asp:Button ID="btnSave" runat="server" Text="Submit" onclick="btnSave_Click" OnClientClick="checktext();" /&gt;
</code></pre>

<p>I have tried using it on the onclick event.. the script will just not work at all.</p>

<p>Any Ideas?</p>
