更改默认值“Default.aspx"到“Index.aspx"在 Visual Studio 2010 上 [英] Change Default "Default.aspx" to "Index.aspx" on Visual Studio 2010

查看:35
本文介绍了更改默认值“Default.aspx"到“Index.aspx"在 Visual Studio 2010 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我在 Visual Studio 2010 上创建新的 Web 窗体时,默认名称始终为Default.aspx".这是一个轻微的痛苦,因为我每次都必须将其更改为Index.aspx".

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.

如何更改此设置,使Index.aspx"成为默认名称?

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

谢谢.

推荐答案

您可以通过修改关联的 .vstemplate 默认名称 元素.例如,您可能会在类似于以下目录的目录中找到需要修改的 webform 模板:C:Program FilesMicrosoft Visual Studio 10.0Common7IDEItemTemplatesCSharpWeb1033.每个模板文件都在一个 zip 文件(如 WebForm.zip)中进行管理.解压缩内容,修改 .vstemplate DefaultName 元素并将更改重新应用到同一个模板文件夹.你的更新应该反映在 Visual Studio 中.(您可能需要重新启动 VS.)

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.

这篇关于更改默认值“Default.aspx"到“Index.aspx"在 Visual Studio 2010 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆