How to write JavaScript validation for a textbox in repeater control?
<p>I have a textbox in repeater control and I have a submit button. I want to validate the textbox using JavaScript such that after entering values in textbox, only one should be submitted. For that, I tried the following. My repeater control is:</p>

<pre><code>  &lt;asp:Repeater Runat="server" ID="repeater" EnableViewState="True"&gt;
   &lt;ItemTemplate&gt;
     &lt;asp:textbox id="txtbox" runat="server"/&gt;
   &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;

&lt;script&gt;
       function validate()
        {
           if(document.getelementbyid("txtbox").value=="")
            {
              alert("enter value in textbox");
              return false;
            }
         }
&lt;/script&gt;
</code></pre>

<p>But this is showing error. Error is a JavaScript error (<code>Object Required</code>). Please help me. It is a C# web application.</p>
