I would like for the generate “List” view contents to have a check added to it to first check that the model has elements, it occurs to me that I have no idea how these views are generated. Can those be changed?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Visual Studio uses “T4” (Text Template Transformation Toolkit) templates to generate the code when you ask for a new file, and yes, they can be edited.
Basically, you find the default templates, copy them into your project, and then edit them to create project-specific custom new-item templates which VS will use instead of the defaults.
A good set of basic instructions can be found at:
http://blogs.msdn.com/webdevtools/archive/2009/01/29/t4-templates-a-quick-start-guide-for-asp-net-mvc-developers.aspx