Validation ASP.Net Tutorial

<%@ Page Language="VB" %>

    Protected Sub Button1_Click(sender As Object, e As EventArgs)
       Label1.Text = "Passwords match"
    End Sub



    CompareFieldValidator


    
        Email:
        
                                                Runat="server" 
                                        ControlToValidate="TextBox1"
                                        ErrorMessage="You must enter an email address"
                                        ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">
        
        
                         Runat="server" Text="Login">