public ActionResult Edit([Bind(Include = "user_id,user_name,pwd,role")] UserClass user) { ViewBag.isExist = "NO"; if (modelClass.isExist(user)) { ViewBag.isExist = "Same User Name is exist already."; } else { if (ModelState.IsValid) { modelClass.Edit(user); return(RedirectToAction("Index")); } } return(View(user)); }