When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
ASPFAQs.com
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sections:
Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Security
Stump the SQL Guru!
XML Info
Information:
Feedback
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
Use Option Explicit!


  • Back to Beginner's Tip Index
  • Next tip...

    At the top of your ASP page, you can insert the statement:

    Option Explicit

    By inserting this code, you are telling the ASP parsing engine that you want to explicitly declare all your variables (via a Dim statement). This is good! :) Using Option Explicit allows you to easily catch misspelled variable names.

    It also makes your code more readable. You won't come across a variable name that apparently popped out of thin air. Rather, all variables in the code will have been declared before they are used!

    There's a good article about using Option Explicit already on 4Guys!

  • Option Explicit: Use It!

  • Back to Beginner's Tip Index
  • Next tip...


  • ASP.NET [1.x] [2.0] | ASPMessageboard.com | ASPFAQs.com | Advertise | Feedback | Author an Article