|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Validation of 2 TextboxesHere is my situation:
I have two fields (let's call them FieldA and FieldB). If FieldA contains a value then FieldB cannot, and if FieldB has a value FieldA cannot. Is there a way using the Validation controls to check for this? RChase напиÑав:
> Here is my situation: Use CustomValidator. Add handler for ServerValidate event.> > I have two fields (let's call them FieldA and FieldB). If FieldA contains a > value then FieldB cannot, and if FieldB has a value FieldA cannot. > > Is there a way using the Validation controls to check for this? Something like this: private void CustomValidator1_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args) { args.IsValid = ((FieldA.Text == "" && FieldB.Text != "") || (FieldA.Text != "" && FieldB.Text == "")); }
SelectedNode wrong when SelectedNodeChanged event fires
Adding a second row to a datagriditem? Use dropdownlist as textbox Convert a Checkbox value to text in a Formview item template Table cell with images Table cell .Net 2.0: Button, OnClientClick, and Click EventHandler not all working nicely... Dynamically Populate Web Page Values bug of UniqueID property dynamic popup menu |
|||||||||||||||||||||||