c# - Razor uses old name of custom class in model after refactoring -
i have multiple projects in website, ones implied here are:
common: contains class renamed using refactoring (say renamedoldnamenewname)viewmodels: contains viewmodel namedmymodelhad property of typeoldnameit's typenewname- website : asp.net mvc4 website razor, try display textbox
@html.editorfor(model => model.town)
when have done refactoring, eveything right, type in model changed , went public oldname town { get; set; } public newname town { get; set; }
but when run application , tries execute razor template in @html.editorfor(model => model.town) implemented keeps throwing exception saying there no type 'oldname' in model...
i tried deleting temporary asp.net files, deleting bin/debug folder, changing razor template involved, rebuilding solution, stoping server , trying again, nothing worked, still got same error.
didn't find on google too... (but perhaps didn't type right keywords).
does have idea how solve problem?
thanks in advance help
you're going have change both model type in editortemplate newname , actual filename of editortemplate newname.cshtml.
Comments
Post a Comment