Validation ASP.Net Tutorial

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



    Regular Expression Tester


    
    

    
        Phone Number:
        
                      ID="regPhone" 
           runat="server" 
           ControlToValidate="txtPhone" 
           ValidationExpression="^(\(?\s*\d{3}\s*[\)\-\.]?\s*)?[2-9]\d{2}\s*[\-\.]\s*\d{4}$"
           Text="Enter a valid phone number" />   
        
         
                        Text="Click this to test validation" 
                  runat="server" />