2

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?

tereško
  • 58,060
  • 25
  • 98
  • 150
amateur
  • 43,371
  • 65
  • 192
  • 320
  • 2
    Check the accepted answer http://stackoverflow.com/questions/5037580/asp-net-mvc-3-partial-vs-display-template-vs-editor-template – Esteban Elverdin Jan 23 '13 at 01:28

1 Answers1

0

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/

Aliasger
  • 156
  • 1
  • 8