c# - The view must derive from WebViewPage -


i had working mvc application when decided time maintenance. views under shared directory , decided move them separate directories.

i implemented customviewengine found here: can specify custom location "search views" in asp.net mvc?

view structure lookes

views     appviews     otherappviews     ...     shared     ... 

this error getting:

the view @ '~/views/appviews/someview.cshtml' must derive viewpage, viewpage<tmodel>, viewusercontrol, or viewusercontrol<tmodel>.

i tried inherit @inherits system.web.mvc.webviewpage (as explained here: the view must derive webviewpage, or webviewpage<tmodel>) , when error saying can't use @inherits , @model @ same time.

thank you

your customengine should derive razorviewengine instead of webformviewengine since use .cshtml files (razor engine).

docs:


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -