I am working with an mvc 4 application and slightly confused on something.
What is the difference between editor templates and display templates? Could someone explain to me what should be included where?
I am working with an mvc 4 application and slightly confused on something.
What is the difference between editor templates and display templates? Could someone explain to me what should be included where?
When you have a type, you can control how it will display on the browser using Editor and Display templates.
The editor template allows you to control how the type will be displayed on a form (for example, if you want it to appear as a text box, check box, or some other way). The display template allows you to control how the type will show up when listing the content that is not a form - such as a list page.
You can have editor/control templates of your own complex types. Here is a link by Dalsoft that may help you - http://www.dalsoft.co.uk/blog/index.php/2010/04/26/mvc-2-templates/