public ActionResult ShowProduct(Product p) { if (ModelState.IsValid) { return View(p); } else { return ShowProduct(); } }
public ActionResult ShowProduct() { Product p = new Product { ProductID = 100, Name = "Kayak", Description = "A boat for one person", Price = 750M, Category = "Watersports" }; return View(p); }