NCS Logo - Click for home page Northstar Developer Center
Platforms
All Platforms
.NET Framework (1.x - 4.x)
Active Server Pages
ASP.NET
C#
SQL Server
VB.NET
Visual Basic

Keywords
.NET Data Types
.NET E-mail
.NET Events
.NET Functions
.NET Object Programming
.NET System.Configuration
.NET System.Diagnostics
.NET System.IO
.NET System.Net
.NET System.Net.Sockets
Active Data Objects
ASP Architecture
ASP Black Belt
ASP Built-in Functions
ASP Built-in Objects
ASP Debugging
ASP Performance
ASP Security
ASP Syntax
ASP.NET Authentication
ASP.NET Controls
ASP.NET Data Access
ASP.NET Features
ASP.NET Master Pages
ASP.NET Page Events
ASP.NET Security
ASP.NET ViewState
Atom
Certifications
COM, DCOM, COM+
Data Access
E-Mail
Errors
Exporting Data
HTML Tips
IIS
Object-Oriented Programming
RSS
SQL
Uncategorized ASP Tips
VB API Programming
VB Forms
VB Syntax
XML

Book Support
Visual Basic 6 Bible
ASP Bible
ASP Weekend Crash Course
ASP.NET At Work
Creating Web Services

ASP Comment Blocks

Written by Eric Smith, Northstar Computer Systems LLC

Like any other programming language, you have to comment your ASP code. Case in point: I wrote some complex logic for a calendar I built last year. I needed to revisit the code and make some modifications, but I hadn't commented heavily. I had to waste time figuring out why I did certain things instead of just reading the comments I should have put into the routine.

One thing I always do is add a comment block for each subroutine I have in my ASP files. Here's a sample one:

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' Sub IncludeFile
'
' This routine reads a file and dumps it to the screen. It 
' allows for variable names to be included instead of the
' hardcoded names required by the SSI directives. 
'
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
This provides a visual break in the long code files I write and provides some useful information about the routine. You can add whatever information you need here. Some people like listing the input and output parameters, assumptions, etc.

Keywords: [ ASP Syntax ]

Publication Date: 2/10/2001, Last Update: 2/13/2010