如何设置的Visual Studio 2012年使用的ASP文件的JavaScript编辑器 [英] how to set Visual Studio 2012 to use JavaScript editor for asp files
问题描述
我怎么能告诉Visual Studio 2012中认识到传统的ASP文件(扩展名为.asp的),如JavaScript?我已经注册.asp扩展到脚本编辑器。这用这样的伎俩在2010年,但这里没有帮助。它看起来像VS不知道用什么语言脚本编辑器。没有关键字高亮显示,没有intelicense。
How can I tell Visual Studio 2012 to recognize Classic ASP files (extension .asp) as JavaScript? I have registered .asp extension to Script Editor. That used to do the trick in 2010, but doesn't help here. It seems like VS doesn't know what language to use for Script Editor. There is no keyword highlighting, no intelicense.
推荐答案
这可以通过添加扩展 ASP
通过编辑 HTML编辑器改变
:
This can be changed by adding the extension asp
with the editor HTML Editor
:
工具
- > 选项
- > 文本编辑器
- > 文件扩展名
Tools
-> Options
-> Text Editor
-> File Extension
- 对于
扩展
键入ASP
- 选择
HTML编辑
- 点击
添加
(或应用
如果要更新现有规则)
- For
Extension
type:asp
- Select the
HTML Editor
- Click
Add
(orApply
if you are updating an existing rule)
的 修改了一下周围的作用和发现,你需要使用 HTML编辑器
,而不是 Web窗体编辑器
。的
Played around a bit and found out that you need to use HTML Editor
and not Web Form Editor
.
最后编辑:的按下面的评论,应该使在JScript中code的路段下面的脚本标记来指示编辑器使用JScript的IntelliSense和突出
FINAL As per comments below, should use the following Script tags around sections of JScript code to indicate to the editor to use JScript intellisense and highlighting:
<script language="JScript" runat="server">
// place your JScript code here
</script>
这篇关于如何设置的Visual Studio 2012年使用的ASP文件的JavaScript编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!