public ActionResult Create(TestModel test) { if (ModelState.IsValid) { string Name = test.Name; string Email = test.Email; return Redirect("/"); } else { return View(test); } }
public ActionResult Create() { TestModel test = new TestModel(); return View(test); }