title: Repeater Textbox Validation Using Button Event in C#
body: <p>I have this repeater where i have added some validation to a textbox. However, the button I wish to use to fire the validation is outside the repeater. Is this possible? If so, I'd rather use server side.</p>
  
  <pre><code>&lt;asp:Repeater ID="rptCart" runat="server" onitemcommand="Cart_ItemCommand" onitemdatabound="Cart_ItemDataBound"&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:TextBox ID="cartQty" runat="server" Text='&lt;%#Eval("shoppingCartQty")%&gt;'&gt;&lt;/asp:TextBox&gt;&lt;/span&gt;
          &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="oops!" ControlToValidate="cartQty" CssClass="errortxt" Display="Dynamic"&gt;&lt;/asp:RequiredFieldValidator&gt;&lt;asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="oops!" ValidationExpression="^[0-9]*[1-9]+[0-9]*$" CssClass="errortxt" ControlToValidate="cartQty" Display="Dynamic"&gt;&lt;/asp:RegularExpressionValidator&gt;&lt;/span&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  
  &lt;asp:LinkButton ID="cartRecalcButton" CssClass="cartrecalcbutton" 
      runat="server" ToolTip="recalculate your shopping cart" 
      onclick="cartRecalcButton_Click"&gt;&amp;nbsp;
  &lt;/asp:LinkButton&gt;
  </code></pre>