|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Server Side Custom Validation not runningIn an ASP.Net 1.1 web page I have added a custom control, that has no
client side validation but has server side validation. I have set the property of the custom validation to have onServerValidate = "CustomValidator_ServerValidate" The server validation code is in the function defined as Public Sub CustomValidator_ServerValidate(ByVal source As System.Object, ByVal args As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator.ServerValidate When running the form and submitting the the data which should then use server validation the function is not being run. Are any other settings required to be set to allow the function to run on the server side? Hello Robin,
Refer to the following link for the CustomValidator and Server validation. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskvalidatingwithcustomfunction.asp Cheers, Kris This works in a new web page but does not work in an existing page that
I need to add the validation to. In the existing page it does not run the validate event but there are other validations on the form which are working including custom validation controls. There are no other validation controls that are validating this particular text box item. Is there any other settings that I could verify/investigate to see why the validate event is not being run? I have added it to the page declarations for the web page and it still
is not running the validatation. Hi,
If it is not working even after ValidateRequest = "true" in page directive, compare the new web page which is working and your old page using Windiff or VSS. And check what you are missing. Cheers, Kris Is there a limit to the number of controls or lines of code in a single
Asp.Net page? As the only thing that I can see difference is the size of the form. I was able to get the page to work by not specifying the control to
validate and adding a page.validate on the form submit button. Thanks for the help.
Classic ASP String Manipulation - NOT .net
CustomValidator is not firing add a list item to a bound control Best way to have multiple pages show up as same selection on menu DataGrid Conditional Formatting Simple String Conversion? Dynamic checkbox loses checked state Programatically Databinding controls within a Repeater MaxLenth doesn't work My WebControls stopped working |
|||||||||||||||||||||||