My controller can’t find the view

Asked

Viewed 168 times

1

I made a controller called Email. In the ActionResult i give an Add View and create the view. When I right click on the ActionResult and give a Go to View, says he didn’t find the view, but if I right click on the View and give a Go to Controller he finds the Controller. What could be wrong? inserir a descrição da imagem aqui

  • What is the name of View? There is an extension file .cshtml with the same name as Action in a directory within Views with the same name as Controller?

  • Yes, the View is called Email.cshtml. The message is: Unable to find a matching view

  • Something in the nomenclature must be wrong. You can take a picture of the screen with Visual Studio and put in your question?

  • The Controller is EmailController and the View is Email too? There I don’t see a Action Email. I see only the Scaffold pattern.

  • It was bad guys. I had to redo the project and this time I forgot to rename from Index to Email to Controller. I ask for descriptions to everyone. Thanks @Ciganomorrisonmendez, thanks more.

1 answer

1


It’s some nomenclature problem. From the photo you took, I don’t see the Action Email in his EmailController.

Try creating the Action and try again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.