1
I have these two action:
public ActionResult Lista(int PessoaId, string Nome, string Twitter)
{
Pessoa p = new Pessoa();
p.PessoaId = PessoaId;
p.Nome = Nome;
p.Twitter = Twitter;
return View(p);
}
public ActionResult Lista2(FormCollection form)
{
Pessoa p = new Pessoa();
p.PessoaId = Convert.ToInt32(form["PessoaId"]);
p.Nome = form["Nome"]; ;
p.Twitter = form["Twitter"]; ;
return View(p);
}
I have this View:
@model Hello.Models.Pessoa
@{
ViewBag.Title = "Lista";
}
<h2>Lista</h2>
<div>
<b>PessoaId</b>
</div>
<div>
@Model.PessoaId
</div>
<div>
<b>Nome</b>
</div>
<div>
@Model.Nome
</div>
<div>
<b>Twitter</b>
</div>
<div>
@Model.Twitter
</div>
Can’t I add two actions to the same view? I tried to add the same View I added in the first action in the second action, but it was not allowed.
is aspnet .....?
– novic
Yes, it is ASPNET!!
– HeyJoe