Before you can use the following codes, please download EASend Mail SMTP Component and install it on your machine at first.Full sample proejcts are included in this installer.
This kind of situation is handled using validation groups.
To create a validation group, you should put the input controls and the validation controls into the same logical group by setting their Validation Group property.
The Lost Focus() event occurs when the input focus leaves the control.
The Private void txt Cr_Lost Focus()event occurs when the input focus leaves the debit text box control.
The following example describes a form to be filled up by all the students of a school, divided into four houses, for electing the school president.
Here, we use the validation controls to validate the user input.The regular expression is set in the Validation Expression property.The following table summarizes the commonly used syntax constructs for regular expressions: The Custom Validator control allows writing application specific custom validation routines for both the client side and the server side validation.Test Recipients method can be used to test if the email address is valid. Firstly, Smtp Client performs a DNS MX record query.If it retrieves the recipient’s local SMTP server successfully, Smtp Client will try to connect to this server.The above code checks whether numeric data is entered in the Credit text box control.