Display template is a html template which can be repeat for each item in its model and it will load in specific section of a view of asp.net web application. A template can have styles/scripts or Razor codes in itself also.
Questions tagged [display-templates]
102 questions
0
votes
1 answer
MVC DisplayTemplate Not Rendering if Named for Interface
I have a Model:
public class Dog: IPet
{
// IPet Implementation
public string Name { get; set; }
}
and a DisplayTemplate in DisplayTemplates/Dog.cshtml
@model IPet // note this is the interface, not the concrete…

Scott Baker
- 10,013
- 17
- 56
- 102
0
votes
2 answers
what would I use in this situation(asp.net mvc 3 display templates)
I have something like this
public class ViewModel1
{
// some properties here
public List ViewModel2 {get; set;}
}
public class ViewModel2
{
public string A {get; set;}
public string B {get; set;}
}
// view
…