0
I got the following:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PostGetModel.Models;
namespace PostGetModel.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
var pessoa = new Pessoa
{
PessoaId = 1,
Nome = "teste teste",
twitter = "@teste"
};
return View(pessoa);
}
}
}
on the Index :
The code does not complete in this part where I add :Postgetmodel what could be wrong?
@Model PostGetModel.Models.Pessoa;
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>model.PessoaId</p>
Does the system raise an exception? What is the name of your view?
– Vinícius
The view name is index
– Harry
The problem is in this part: @Model Postgetmodel.Models.Pessoa @{ Viewbag.Title = "Index"; } <H2>Index</H2> <p>.Personal modelid</p>
– Harry