Posted on: 6/10/2014 3:26:36 PM | Views : 425

Hi All,

I have two buttons and on both there are separate controls to be validated and some are common.
So, I want to use two required field validator with a text box as mentioned below:
<asp:TextBox ID="txtInvoiceNumber" runat="server" Height="20px" TextMode="MultiLine" TabIndex="1"></asp:TextBox> <asp:RequiredFieldValidator runat="server" ID="reqInvoiceNumber" ControlToValidate="txtInvoiceNumber" ValidationGroup="valSave" ErrorMessage="Required field" ForeColor="Red" EnableClientScript="false" /> <asp:RequiredFieldValidator runat="server" ID="reqInvoiceNumberOnly" ControlToValidate="txtInvoiceNumber" ValidationGroup="valSaveInvoice" ErrorMessage="Required field" ForeColor="Red" EnableClientScript="false" /> ...

Go to the complete details ...