asp.net mvc 4 - Calling classes in model folder from cshtml file -
asp.net mvc 4 - Calling classes in model folder from cshtml file -
i'm starting move away having classes in folder called app_code in mvc4 projects, , moving classes folder called models.
now i've encountered problem old code.
in cshtml files used phone call app_code classes @using projectname.app_code in origin of file. doesn't work now.
my question therefore; how phone call class in model folder cshtml files?
if have moved classes (and changed namespace when moved them) need alter @using namespace reference in cshtml file old reference new reference.
to help this, alter web project compile views show references fail when perform build. need alter <mvcbuildviews>
setting in .csproj file true mentioned here phil haack.
additionally, mentioned here in reply javad_amiry, can update list of namespaces used views updating <namespaces>
setting in the web.config file.
asp.net-mvc-4 razor
Comments
Post a Comment