Visual Studio Syntax Highlighting and Intellisense for Classic ASP

With the new release of Visual Studio (VS) 2005, you would think that it would have full support for classic ASP when working in a directory. This is not the case. There are some hacks out there, however none are fully functional and some require that you set the page directive on every page you want highlighting and intellisense. Of course this will break some of your pages.

For those who want the power of VS (mainly Intellisense), you still need to use vs 2003 until MS makes a fully functional .asp template for VS 2005.

This tutorial will walk you through the process of creating a Solution that allows you to edit your classic ASP in VS 2003. The site must be accessible though windows explorer (C:\ or mapped drives).

  1. Start VS 2003
  2. File > New > Blank Solution
  3. Name it “Classic ASP” or whatever. The location is where the link will be stored for opening the solution and all it’s projects.
  4. Add your sites…
  5. Right Click the Solution “Classic ASP”
  6. Add > New Project > Visual Basic Projects > New Project In Existing Folder
  7. Name it “My ASP Site 1″
  8. Click Ok
  9. Browse to the location of the root folder for that web site.
  10. Single click the project. From the VS menu bar, click Project > Show all Files (or click the second button in the solution Explorer)
  11. Repeat for all your sites/directories.



Now when you start the solution, all the sites and files will be listed from within VS 2003. You now have html, javascript, and vbscript intellisense. You also get param lists when you call functions/subs that are on the same working page. Sweet!

Notes:

  • VS will create a couple of files in the project directories (bin folder, .vbproj, .vbproj.user) . They are harmless and a small price to pay for the power of VS.
  • You may get a warning about a project not being fully trusted by the .NET runtime. That’s ok, we are not using .NET here anyway.

Comments RSS


Leave a comment:


Blog | Contact | Gallery | Links | Sandbox | Social Networking | Weather | Web Design


Copyright © 1997-2009 KCSH. All rights reserved.