Microsoft Most Valuable Professional

Chris Pietschmann

An MVP From Wisconsin



Configure Visual Studio 2005 for "Classic" ASP syntax highlighting and intellisense

You can use the Visual Studio 2005 IDE to edit your Classic ASP files and still utilize syntax highlighting and intellisense. All you have to do is associate the “.asp“ file extension with the Web Form Editor. When doing this you are telling the IDE to treat “.asp“ files the same as “.aspx“ files, in turn sort of “tricking“ the IDE in to giving you the syntax highlighting and intellisense that you want.

The steps in setting up the IDE are as follows:

  1. Open Visual Studio
  2. Goto the "Tools" menu and click "Options..."
  3. Check the "Show all options" checkbox in the bottom left of the dialog box.
  4. In the right pane expand "Text Editor" and select "File Extension"
  5. Enter "ASP" extension in the "Extension" textbox
  6. Select "Web Form Editor" in the Editor dropdown box
  7. Click the "Add" button and click "Ok" on the dialog box.

And now enjoy all the syntax highlighting and intellisense features for JavaScript, HTML and Visual Basic while editing your Classic ASP files.

Currently rated 3.3 by 10 people

  • Currently 3.3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:
Categories: General
Posted by crpietschmann on Monday, October 31, 2005 5:58 PM
Permalink | Comments (10) | Post RSSRSS comment feed

Related posts

Comments

Matt

Monday, January 09, 2006 12:18 PM

Matt

Syntax highlighting works, but not Intellisense.

Erik

Tuesday, January 24, 2006 2:40 PM

Erik

Honestly, I think that this helps a bit but for better functionality, you really need to add the following line to the top of every page. Not an ideal solution by any means...

<% @ Language=VBScript %>

Erik

Tuesday, January 24, 2006 2:41 PM

Erik

ASP was stripped out...

@ Language=VBScript

Note, you will need to enclose in the ASP tags...

Tom Shelley

Thursday, March 16, 2006 2:44 PM

Tom Shelley

Intellisense of the VBScript sections contained within <%%> still do not work. I have my web pages split across multiple files and cannot use the @language=vbscript at the top of each file because the of syntax error it produces. I guess I could put it there temporariliy to get the intellisense; but it's so much easier to just use Visual Studio 2003 instead. I guess I have yet to be converted.

Les Matheson

Monday, July 31, 2006 9:40 AM

Les Matheson

That did the trick, thanks!

John

Thursday, September 14, 2006 4:57 AM

John

Has anyone resolved this issue as we are in the same boat! Any help would be appreciated

Todd

Wednesday, November 22, 2006 10:09 PM

Todd

Putting <%@ Language=VBScript %> at the top of every page worked great for me...Intellisense and syntax highlighting. Thanks!

Chris

Wednesday, December 13, 2006 4:50 PM

Chris

Downgraded to 2003. Works a charm.

RoamingGeorge

Wednesday, January 03, 2007 1:09 AM

RoamingGeorge

Worth noting that this tip also works with Visual Web Developer Express, which is somewhat more free than VS! (Handy for on-site degugging etc)

Matt Tew

Wednesday, January 31, 2007 9:33 PM

Matt Tew

To make this work for include files, instead of using normal < % % > tags, instead use script runat="Server" language="VBScript" /script tags to enclose functions. (put the brackets in at appropriate places)

Only do this for functions and not inline code, as the inline code will not execute in the order you expect.

Comments are closed

About the author

I'm Chris Pietschmann, go to the About Me page to learn more about me.

Search

Sponsors

Web.Maps.VE - ASP.NET AJAX Virtual Earth Mapping Server Control

Recent comments

Disclaimer


This work is licensed under a Creative Commons Attribution 3.0 United States License, unless explicitly stated otherwise within the posted content.
© Copyright 2004 - 2008 Chris Pietschmann