Customize the Template of New Files in vs.net 2003

xiaoxiao2021-03-06  67

In vs.Net 2003, WHEN WE Add A New Item, IE A Class, A WebPage, OR A Form, To The Project, The Ide Will Automatical Generate Some Code in The Newly-create Diles. This Can Surely Save US Some Time Writing repeated code. But sometimes we may want to customize the auto-generated code, for instance to add the copyright info in the header of the files. Although undocumented, there is a way to customize the templates from which vs.net 2003 created new files .First let's take a look ion stock, as illustrate in The Following flight:

We'll Examine VC # Folder Only Here, Other Folders (Such As VB7 and VC7) Are Simlimar in Structure. AS CAN Be Seeen, There is A "VC # Wizards" Folder Under "VC #". This Folder Stores All The Templates from which all the new files are created. Folder "VC # Wizards / 1033" is the deposit for shared files common to all the templates, such as javascript, cascade style sheet, and images. "1033" stands for "US-English" culture. This number should vary according to your vs.net 2003 installation language. Except this shared folder, each folder under "VC # Wizards" represents one kind of template and has a "Templates / 1033" subfolder in it. Again, "1033 "have the same meaning with that under" VC # Wizards ".For example, if we create a asp.net web application, the template for web form resides in" VC # Wizards / CShareWebAppWiz / Templates / 1033 "and is named" WebForm1 .aspx ", SHOWN IN THE FOLLOWING FIGURE:

转载请注明原文地址:https://www.9cbs.com/read-90533.html

New Post(0)