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
Post a Comment