Use custom verification controls in ASP.NET (original)

xiaoxiao2021-03-06  63

ASP.NET 1.1, there are many verification controls, which greatly facilitates us, but sometimes, when you need to do special verification, you will feel insufficient enough, so we can use custom verification control CustomValidator, you want to use this Controls, must write the corresponding event on the server, the format is as follows:

Sub FunctionName (Sender As Object, Args As ServerValidateEventArgs)

...

End Sub

Among them, pay attention to the two parameters value: Indicates which control isvalidator that is currently CustomValidator, is true, indicating that the page control has passed verification. For example, if you have a verification page, you are using the input of the text box.