//判断用户名 if (!Regex.IsMatch(name, @"^[a-zA-Z0-9]{6,20}$")) { Utility.Tool.Alert("用户名长度必须大于6个字符小于20个字符", this.Page); return; }