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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -