Validate user email address in ASP.NET (VBASPNETEmailAddressValidator)

The ASP.NET sample illustrates how to validate user's email address in the user registration form

 
 
 
 
 
5 Star
(1)
15,954 times
Add to favorites
5/5/2011
E-mail Twitter del.icio.us Digg Facebook
'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated. 
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On


Partial Public Class _Default

    '''<summary>
    '''Head1 control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents Head1 As Global.System.Web.UI.HtmlControls.HtmlHead

    '''<summary>
    '''form1 control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents form1 As Global.System.Web.UI.HtmlControls.HtmlForm

    '''<summary>
    '''ValidationWizard control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents ValidationWizard As Global.System.Web.UI.WebControls.Wizard

    '''<summary>
    '''WizardStep1 control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents WizardStep1 As Global.System.Web.UI.WebControls.WizardStep

    '''<summary>
    '''tbHost control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents tbHost As Global.System.Web.UI.WebControls.TextBox

    '''<summary>
    '''tbSendMail control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents tbSendMail As Global.System.Web.UI.WebControls.TextBox

    '''<summary>
    '''tbSendMailPassword control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents tbSendMailPassword As Global.System.Web.UI.WebControls.TextBox

    '''<summary>
    '''chkUseSSL control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents chkUseSSL As Global.System.Web.UI.WebControls.CheckBox

    '''<summary>
    '''WizardStep2 control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents WizardStep2 As Global.System.Web.UI.WebControls.WizardStep

    '''<summary>
    '''lbMessage control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents lbMessage As Global.System.Web.UI.WebControls.Label

    '''<summary>
    '''tbValidateEmail control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents tbValidateEmail As Global.System.Web.UI.WebControls.TextBox

    '''<summary>
    '''btnValidate control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents btnValidate As Global.System.Web.UI.WebControls.Button

    '''<summary>
    '''btnSendAgain control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents btnSendAgain As Global.System.Web.UI.WebControls.Button
End Class