Codebehind E-Mail Validation


        public bool IsValidEmail(string Email)
        {
            string strRegex = @"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
                @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
                @".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$";

            System.Text.RegularExpressions.Regex _Regex = 
                     new System.Text.RegularExpressions.Regex(strRegex);

            if (_Regex.IsMatch(Email))
                return (true);
            else
                return (false);
        }

My Showcase

Copyright © 2013 Chris Hanna