How to check if a asp text box is empty or not
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3502354/textbox-empty-check-using-javascript">textbox empty check using javascript</a>  </p>
</blockquote>



<p>I have a asp.net button and a asp.net textbox, when I click on button, I want to check if textbox is empty or not but not sure how I can do that,</p>

<pre><code>&lt;div&gt;
    &lt;asp:TextBox ID="txtEU" runat="server"&gt;&lt;/asp:TextBox&gt;
&lt;/div&gt;
&lt;div&gt;
    &lt;asp:ImageButton ID="button" runat="server" OnClientClick="MyFunction(); return false;" ImageUrl="/myfolder/abc.png" /&gt;
&lt;/div&gt;
</code></pre>

<p>in my JavaScript I am doing,</p>

<pre><code>   &lt;script type="text/javascript"&gt;
    function doWork() 
    {  
        if($input[]
</code></pre>

<p><strong>not sure  how to check if its empty or not, if its empty then I am doing something if not then it should call a code behind method for that button.</strong></p>
