I’ve found information about Editor and Detail templates based on object name (i.e. DateTime, MyCustomObject) for use with MVC system. I am just wondering if it was possible for creating templates for use when creating the items in a similar fashion, where the form used for Creating the items is going to be different than the Editing Screen.
I’ve found information about Editor and Detail templates based on object name (i.e. DateTime,
Share
Yes you can tell MVC to distinguish between templates a few different ways.
You can tell the view what template to use.
vs
Or if you are using view models you can use Data Annotations to tell it what template to use right in the model.
So your Edit view model would look like this:
and your Create view model would look like this: