public ActionResult editTag(Tag tag) { if (!isLogin()) return RedirectToAction("login", "auth"); User user = getCurrentUser(); tag.UserId = user.Id; Provider db = new Provider(); try { db.updateTag(tag); db.mergeTag(tag.Id, tag.Name); } catch (Exception e) { return Content("fail" + e.Message); } return Content("ok"); }