TheConeHead
Programmer
I have two fields where if they are both blank it is ok, but if one is filled out then the other one must be filled out also, How would I validate this with asp.net? Comparevalidator? if so, how?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<asp:CompareValidator id="valCompare" runat="server"
ControlToValidate="textbox1" ControlToCompare="textbox2"
Operator="Equals"
ErrorMessage="your error message"
Display="dynamic">
</asp:CompareValidator>