tags:

views:

72

answers:

1

Can the "Add View..." wizard in ASP.NET MVC ignore a property in my Model when creating a strongly-typed View? I select "Create" as the "View Content" in the wizard and want certain properties in my Model to be ignored. I want to quickly create and delete Views while prototyping, and I don't want to manually edit a View that I'll only delete the next time I change my Model.

+1  A: 

You can modify existing / add new T4 templates for the visual studio code generation that is used to generate the MVC view code.

More info from David Hayden, and the microsoft MVC team

Have fun :)

Steve Willcock