Asp.net MVC: Save on repetitive markup with EditorForModel vs Flexibility -


i'm quite new asp.net mvc developer , current question editorformodel htmlhelper i'm indulged use save on repetitive markup within application.

but i'm hesitant because seems bit unflexible when comes layout of form.

one of cases rather large form surely 30+ fields user enter. naturally kind of form divided different sections , sections distributed between columns. use editorformodel assume have create subclasses members of viewmodel class , create partial views each member can call editorformodel render part of overall model.

in essence think question this: should viewmodel classes represent actual user interface view strictly or should view self (.cshtml) responsible final layout of form?

also, if have fields break repetitive markup of [wrapper label , input field], example combination of postal code , city fields should line beside each other instead of after each other, supposed wrap properties (probably entire adress) within own class , create specific editortemplate that?

all of seems bit overkill me, in end can see might thing do. input welcome before embarge on making these refactorings existing forms...


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -