Take the 2-minute tour ×

Wondering if it's considered best practice to use Strongly typed views in only your Edit forms, or should they be used in create forms as well.

I know it most likely depends, but just haven't found a good resource yet outlining best practices with regards to using ViewModels.

share|improve this question
I can't imagine a reason why you wouldn't want to use a strongly-typed model for any view which has form elements. Especially if those form elements on the create form are going to use data annotations and things like that. –  David Oct 3 '13 at 14:50

1 Answer 1

up vote 1 down vote accepted

Best Practise in my opinion is to have one type/view for both edit and create, because in most cases what you have entered in the first place need to have ability to edit it later, so the best to have one view/type that do edit/create with may be small UI changes in case of create or edit such as disabiling some fields that only editable at create stage , etc

share|improve this answer
Thank you for your answering. Do you also suggest putting data annotations for validation etc, against the viewmodel. I think where i'm getting lost is how you begin to include elements such as model binding (perhaps custom) and automapper. Up to this point, i haven't found many good explanations that explain things as a whole. usually, just bits and pieces from stackoverflow threads etc. would be great to find a read that really outlines everything for me. –  user1541443 Oct 3 '13 at 16:45
you can put if you dont have complex validation processes , but if you think it is not just simple "required" then I recommend to use client side libaries such as rickharrison.github.io/validate.js , I found client side validation libraries was more flexable and easy to maintain than data annotations –  sino Oct 3 '13 at 17:14

Your Answer


