public ActionResult Events(int? id) { EventsGridViewModel viewModel = new EventsGridViewModel( pageSize: EVENTS_GRID_SIZE, currentPage: id ?? 1 ); return View(viewModel); }
public ActionResult Events(string ipaddress) { IPAddress server; if (IPAddress.TryParse(ipaddress, out server)) { EventsGridViewModel viewModel = new EventsGridViewModel(server); return View("Events", viewModel); } else { return RedirectToAction("Index"); } }