Results 1 to 2 of 2

Thread: Custom Validation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2003
    Posts
    110

    Custom Validation

    I have two textbox and four buttons on a form.

    Both textbox have their own Required Validation and they are showing fine in the Validation Summary.

    Now each of the four buttons when clicked perform some database hits and if it fails then they have are supposed to show their own error message.

    I have used a common label for showing those errors. Since only one button can be clicked at a time, the common label for all four of them serves fine.

    Now if we leave any of the fields blank and click any of the button, the required validation shows up. And the good thing about them is that they HIDE themselves on any other click.

    While the label that shows up doesnt hide.

    I would prefer to avoid JavaScript if possible.

    Regards,
    Anis
    Anis Bombaywala

  2. #2
    Lively Member
    Join Date
    Nov 2002
    Location
    Malaysia
    Posts
    124

    ---

    Code:
    RequiredFieldValidator1.Enabled = False
    Above is to hide the validation control, hope this is what you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width