2
I added a folder inside another folder in the views folder, this way:
Views/Register/Profile
Inside the profile folder are the files .cshtml. However, when I try to access the files .cshtml I get an error in the application, already tried this solution: How to direct an Action to a view inside a folder? and I couldn’t solve it, the AP says at the end, I have to create route, but I can’t.
My controller is as follows:
public ActionResult Perfil()
{
var perfils = db.Perfil.Where(p => p.Nome != "Administrador" && p.IDStatus == 1).ToList();
return View("Perfil/"+perfils);
}
Post the way you are doing on your controller. What error does it show?
– Randrade
No problem, at first it’s just like that. If you have something to add, you can always edit your own question. Do not use the answer field for this.
– Randrade
Welcome to [en.so], do a [tour], to learn a little more about the operation of the site to increase your chances of getting a good response.
– Randrade