public ActionResult SendMail(BindingViewModel model) { if (Request.IsAjaxRequest()) { return null; } return RedirectToAction("Index"); }
// // GET: /Binding/ public ActionResult Index(string searchTerm = null, int page = 1) { var model = new BindingViewModel(); var user = User.GetSmartRewardUser(db); model.result = db.Users .Where(u => u.UserId != user.UserId && (searchTerm == null || u.Email.Contains(searchTerm))) .OrderBy(u => u.UserId) .ToPagedList(page, 10); if (Request.IsAjaxRequest()) { return PartialView("_Members", model); } return View(model); }