Is there a way to verify that the sum of the values in three textboxes is greater than a blank value?
<asp:TextBox ID="tbDate" runat="server"></asp:TextBox>
<asp:TextBox ID="tbHour" runat="server"></asp:TextBox>
<asp:TextBox ID="tbMinutes" runat="server"></asp:TextBox>
<asp:CustomValidator ID="cvDateControlValidator" runat="server" ErrorMessage="Invalid Date"
ValidateEmptyText="True" ClientValidationFunction="validateDateOnClient" ControlToValidate="tbDate"
Display="Dynamic"></asp:CustomValidator>
<script type="text/javascript">
function validateDateOnClient(sender, args) {
if (args.Value.length > 0)
args.IsValid = false;
return args.IsValid;
}
</script>
One approach suggested was:
if (tbDate.value != '' || tbHour.value != '' || tbMinutes.value != '')
Prior to conducting client-side validation, I need to confirm that tbDate, tbHour, and tbMinutes collectively exceed the value of blank.