Validator Custom Control

Results 1 to 2 of 2

Thread: Validator Custom Control

  1. #1
    Join Date
    Dec 1969

    Default Validator Custom Control

    I have problem when I try to attach a client validation to a Validator Custom Control. First of all because I don't know how to attach the javascript I inherited from CustomValidator in order to assign the name of the client function to the ClientValidationFunction property. In this way the javascript function is fired when I change the focus and when I submit BUT the fuction is never called if I submit the form without a value in the textbox (wich is the control I care to validate) and I woukld like to perform also the check on empty form without use another validator control such as RequiredFieldValidator

  2. #2
    Join Date
    Dec 1969

    Default Server side check -

    If you want to stick with the one custom control just do:<BR>dim yourVar as string = textbox1.text.trim<BR>If yourVar.length &#060; 1 OrElse yourVar = "" then<BR>&#039;its empty <BR>else<BR>&#039;do other stuff<BR>end if<BR><BR>For client side with the custom controls that we wrote, we just wrote Javascript and put it in the HTML the old-fashioned way.

Posting Permissions

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