0
I am a beginner in ASP Net and I am in the "studies" phase, I wanted to know why my code is giving attributes errors. I am using a POST method to send the attributes to a VIEW. Here is a picture of the problem attached.
View of my HOME:
@model PostGetModel.Models.Pessoa
@{
ViewBag.Title = "Index";
}
<form action="/Home/Lista" method="post">
<fieldset>
<legend>Pessoa</legend>
<div>
<label for="PessoaId">Código da pessoa</label>
</div>
<div>
<input type="number" value="3" id="IdPessoa" name="PessoaId"/>
</div>
<div>
<label for="Nome">Nome da pessoa</label>
</div>
<div>
<input type="text" value="@Model.Nome" id="Nome" name="Nome" />
</div>
<div>
<label for="Twitter">Twitter da pessoa</label>
</div>
<div>
<input type="text" value="@Model.Twitter" id="Twitter" name="Twitter" />
</div>
<p><input type="submit" value="Enviar" /></p>
</fieldset>
</form>
JPG of my problem.
This is my first question on Stack Overflow, and I’m grateful to be a part of that community and if anyone can help me. A thousand apologies if I didn’t explain it right. Anything I give an EDIT.
Welcome to the Breno. Some improvements you can make to the question: put the error message and not the image, put the source of the controller and not the image. Always prefer text, when possible.
– George Wurthmann
Breno as soon as you make the corrections that George mentioned we can help. I am waiting and help you.
– Fabri Damazio
Please do not use images to display codes, please read https://pt.meta.stackoverflow.com/a/5485/3635, then after this the error message and code turn into text and edit your question.
– Guilherme Nascimento