Reputation: 1
My code keep returning
"The view 'Shrek!' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Movies/Shrek!.aspx
~/Views/Movies/Shrek!.ascx
~/Views/Shared/Shrek!.aspx
~/Views/Shared/Shrek!.ascx
~/Views/Movies/Shrek!.cshtml
~/Views/Movies/Shrek!.vbhtml
~/Views/Shared/Shrek!.cshtml
~/Views/Shared/Shrek!.vbhtml
The entire project was to make a view page in ASP.NET MVC display a movie name "Shrek", but it keeps showing that error above.
Upvotes: 0
Views: 37
Reputation: 24
It seems like the issue lies with the name of your view file. In ASP.NET MVC, file names should not contain special characters like !. This character might be causing trouble for the view engine to locate the view. I suggest you change the view file name from Shrek! to Shrek and then try running your code again. If you’re still facing issues
Upvotes: 1