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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
This can be changed by adding the extension asp
with the editor HTML Editor
:
Tools
-> Options
-> Text Editor
-> File Extension
- For
Extension
type:asp
- Select the
HTML Editor
- Click
Add
(orApply
if you are updating an existing rule)
EDIT: Played around a bit and found out that you need to use HTML Editor
and not Web Form Editor
.
FINAL EDIT: 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>