I have a .cshtml file in my App_Templates folders that builds but I have heaps of errors.
I get it saying things like:
- The name 'Model' does not exist in the current context
- The name 'ViewBag' does not exist in the current context
- HtmlHelper does not contain a definition for 'TextBoxFor' and no extension method for 'TextBoxFor' accepting a...
It is strange because other cshtml files in other directories are fine and have no red line errors. I have restarted VS, restarted my PC, tried adding a few assembly lines from other questions and rebuilding. I have tried for the past day but can't fix this annoying thing.
Any helpful hints or tips would be great. If you require any specific information please let me know and i'll edit this post.
App_Templatesfolder containweb.config? - Mairaj AhmadViewsorViews\Sharedfolders.@helpercode packaged into cshtml files should reside inApp_Code. - Georg Patscheider