Пример #1
0
        //public ActionResult CheckNicname(string nicname)
        //{
        //    if (nicname.Contains("a"))
        //    {
        //        return Json(string.Format("{0} is reserved, enter another nic", nicname), JsonRequestBehavior.AllowGet);
        //    }
        //    else
        //    {
        //        return Json(true, JsonRequestBehavior.AllowGet);
        //    }

        //}

        public ActionResult CheckNicname(Member member)
        {
            if (member.Nicname.Contains("a"))
            {
                return Json(string.Format("{0} is reserved, enter another nickname", member.Nicname), JsonRequestBehavior.AllowGet);
            }
            else
            {
                return Json(true, JsonRequestBehavior.AllowGet);
            }

        }
Пример #2
0
 public ActionResult Register(Member member)
 {
     if (ModelState.IsValid)
     {
         Response.Write("Page is valid");
     }
     else
     {
         Response.Write("Page contains errors");
     }
     return View(member);
 }