Пример #1
0
 public string LengthCheck(string pw)
 {
     if (Request.IsAjaxRequest())
     {
         bool   status = PasswordUtility.PasswordLength(pw);
         string result = status ? "通過" : "不通過";
         return(result);
     }
     else
     {
         return("非AJAX請求!");
     }
 }
Пример #2
0
 //合適用 AJAX
 public string LengthCheck(string pw)
 {
     if (Request.IsAjaxRequest())
     {
         bool   status = PasswordUtility.PasswordLength(pw);
         string result = status ? "通過" : "不通過";
         return(result);
     }
     else
     {
         return("非 AJAX 請求 !");
     }
     //前端需搭配
     //   <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
 }