如何设置的Visual Studio 2012年使用的ASP文件的JavaScript编辑器 [英] how to set Visual Studio 2012 to use JavaScript editor for asp files

查看:131
本文介绍了如何设置的Visual Studio 2012年使用的ASP文件的JavaScript编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能告诉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


  1. 对于扩展键入 ASP

  2. 选择 HTML编辑

  3. 点击添加(或应用如果要更新现有规则)

  1. For Extension type: asp
  2. Select the HTML Editor
  3. Click Add (or Apply 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屋!

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