1.

What are the differences between Partial View and Display Template and Edit Templates in ASP.Net MVC?

Answer»

  • Display Templates : These are model centric. Meaning it depends on the properties of the view model used. It uses convention that will only display like divs or labels.
  • Edit Templates : These are also model centric but will have editable controls like Textboxes.
  • Partial View : These are view centric. These will differ from templates by the way they render the properties (Id's) Eg : CategoryViewModel has Product class property then it will be rendered as Model.Product.ProductName but in case of templates if we CategoryViewModel has List then Html.DisplayFor(m => m.Products) works and it renders the template for each item of this list.


Discussion

No Comment Found