Reputation: 81
I would like to control or customise the output generated by DisplayFor and EditorFor so it doesn't render the default html css tags for example: .......
I would like this to be for all views not just a type or system type? And what is the simplest solution?
Any help would be appreciated.
Upvotes: 0
Views: 784
Reputation: 8644
You can always create a custom DisplayFor/EditorFor *.asxc file that resides in either Shared/DisplayTemplates or -/EditorTemplates
, pass the relevant type to it and just render what you want.
Following article explains it in further details:
(This introduces the DisplayFor method - EditorFor works exactly the same way)
Upvotes: 3