public ActionResult Clientes() { ViewData["Opcoes"] = new SelectList(new[] { "", "Sim", "Nao" }); Clientes Obj = new Clientes { Codigo=1, Nome="Teste", MalaDireta="Sim" }; return View(Obj); }
public ActionResult Clientes2(Clientes Obj) { if (Obj.Nome == null) { return View(); } else { return Redirect("ClienteInserido?Codigo=" + Obj.Codigo.ToString()); } }