Hi i am new to this forum, which i found when looking for a solution to an annoying problem i have. Im pretty new to .net so this could be something simple.
I have a gridview which returns fields from several membership provider tables, so that 'admins' on my system can update and unlock accounts of their staff. The email field has 2 custom validators which i have wrote for the column.
One checks that the newly edited address is not already in use in the system. If it is, it throws up the validation error message. There when i click cancel it returns to the original value (correct!)
The second one is to check that the newly edited address is one of our 2 allowed domain address. This throws up the validation error message if the domain is not correct, however here if i click cancel, it saves the edited (and invalid) address instead of returning to the original address that was in the girdview.
my validation is pretty simple, i cut out the domain and then run the following on the domain (maildomain)
Code:
'validate email address domain
If maildomain = "@domain1" Or maildomain = "@domain2" Then
e.IsValid = True
Else
e.IsValid = False
End If
im guessing that somewhere the old values of the email address are being replaced with the new values when validating but i cannot see why. And to make it even stranger it isnt happening with my other custom validation (for duplicate addresses).
Any ideas?