Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Whenever I create a new Web Form on Visual Studio 2010, the default name is always "Default.aspx". This is a slight pain as I'm having to change it to "Index.aspx" each time.

How can I change this so that "Index.aspx" is the default name?

Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
17.9k views
Welcome To Ask or Share your Answers For Others

1 Answer

You can by modifying the associated .vstemplate DefaultName element. For example, you might find the webform template you need to modify in a directory similar to the following: C:Program FilesMicrosoft Visual Studio 10.0Common7IDEItemTemplatesCSharpWeb1033. Each template file is managed within a zip file like WebForm.zip. Unzip the contents, modify the .vstemplate DefaultName element and reapply the changes to the same templates folder. Your updates should be reflected in Visual Studio. (You might need to restart VS.)

As an alternative, you should consider creating your own template (based off the original) instead of modifying the default template.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...