Classic ASP with VWD: why is JScript default language?

Hi all,

Thankfully, I can use Visual Web Developer to edit Classic ASP scripts. But there's an annoying problem I'd like a solution for!...

As long as I have the "@LANGUAGE=VBSCRIPT" directive at the top of a page, it will correctly format VBScript scripts (keywords in blue, comments in green, strings in red, full intellisense for functions etc.).

However, I have to use multiple Include files for each full page, which means not all page chunks can have the @LANGUAGE directive at the top. Here's the problem. Without the @LANGUAGE directive, VWD assumes the default scripting language to be JSCRIPT, and formats all script blocks accordingly.

How do I change VWD's default scripting language to VBScript


Answer this question

Classic ASP with VWD: why is JScript default language?

  • someone_blank

    I have been trawling the web looking for an answer to this with no success. All I can see is a lot of people having the same problem without any decent fix. I am sure microsoft realise that developers have to look after legacy webs sites as well as brand new ones so why are they making so difficult. Come on Microsoft - sort it out!



  • Pardner

    I first posted this question a year ago, and still I've found no solution.

    To get <% %> code blocks color-formatted as VBScript by default, I manually set .asp files to use the "Web Form Editor" "editing experience". However, this disables code block Intellisense unless the page starts with @language="vbscript" .

    It still annoys me though, because the default IIS language is VBScript, so I don't see why I should have to start all my pages with the @language directive. It's especially annoying dealing with #include'd files which can't contain the directive.

    I have no doubt that it's really simple to toggle the default language from one to the other -- why would such an arbitrary language choice be hard-wired

    Any development team members at a loose end who want to tell me how to fix this, I'll buy you a beer... then pour it into a thermos, package it up with its pint glass and FedEx it to Redmond first class so you don't even have to get up from your desk.


  • tamir zaslavskt

    Unfortunatly we don't expose a default language option any more. The focus of VWD has been on ASP.Net 2.0 functionality, not classic ASP.

    There are 2 possible workarounds to your problem:

    a) In the included files, specify the language on the script blocks. Eg <script runat=server language=vbscript>

    b) If you are including just blobs of script code that get included inside a script block, then use the ".vbs" extension for that script. That will then get associated with the VB Script editor.

    I hope that helps,

    sam
    Web platform & tools team

  • drtchmlp

    You mean to say there's nobody out there who knows about this

    I find that hard to believe...

    Ah well, what did I expect from Microsoft...



  • mmuncut

    Thanks for trying to help, but I'm talking about code in render blocks like this: <% %>. The language default is JScript, which seems quite arbitrary, and there's no way to change it in the GUI.

    I have to specify <%@LANGUAGE="VBSCRIPT" %> for each and every page if I want to get VBScript formatting and intellisense within render blocks. Obviously, I can't do this for includes.

    Isn't there a registry setting or something I can tweak to change the default Intellisense from JScript to VBScript


  • Anand Mahadik

  • getyourbone

    I am having the same problem. Is this a dead subject or is there some way to set the default language to vbscript instead of jscript. I help support a large web application the uses include files that contain VBScript functions in them and it makes them very hard to follow when none of the color coding works like comments and the like. Its like using notepad to write code:(

    Thank you


  • Classic ASP with VWD: why is JScript default language?