Validation ASP.Net Tutorial

<%@ Page Language="C#" %>

    protected void Button1_Click(Object sender, EventArgs e) {
       Label1.Text = "Page is valid!";
    }



    RequiredFieldValidator


    
    

        
                                            Runat="server" 
                                    ErrorMessage="Required!" 
                                    ControlToValidate="TextBox1">
        
                 Runat="server" 
         Text="Submit" 
         OnClick="Button1_Click" />