logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Painting
Heart Disease
Horror Literature
Dating
Hiking & Backpacking
SF/Fantasy Books
Healthy Foods


dailyclick
All times in EST

Clairvoyance: 08:00 PM

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

Adding Comments in ASP

Guest Author - Lisa Shea

Sometimes it's the simple things that confuse people. How do you add comments to your ASP code, to make it more readable and documented?

It's very easy - you just put a single quote (') at the beginning of your line of ASP. So your code might look like this -

'initialize variables'
CurrMonth = request("m")
CurrDay = request("d")

Note that I put an apostrophe before AND after my comment. You don't have to do that. But I use the TextPad editor (which I highly recommend) and it automatically highlights things based on where an apostrophe begins and ends. So by putting one on each end of my comments, I turn them all a different color.

Comments do NOT get interpreted so you can put whatever you want into them. However, while comments are important to keep track of what you are doing, I do NOT recommend putting a ton of comments into your code. Remember, your entire file has to be parsed and processed before the result is sent off to the end user. If you write War and Peace in your comments, it is going to take a while before that file gets to your end user - meaning they could give up and go elsewhere. You want your live ASP pages to be as streamlined as possible.

So I recommend putting in comments above every major block of code, so if you have to go in and debug it months later you can remember what you were doing. Maybe add a line or two at the top with the last date of change and the author's name. But leave all robust documentation separate. The primary purpose of ASP code in the end is to create a webpage for a user - and in that sense, quick action is of primary importance.
This site needs an editor - click to learn more!

Add Adding+Comments+in+ASP to Twitter Add Adding+Comments+in+ASP to Facebook Add Adding+Comments+in+ASP to MySpace Add Adding+Comments+in+ASP to Del.icio.us Digg Adding+Comments+in+ASP Add Adding+Comments+in+ASP to Yahoo My Web Add Adding+Comments+in+ASP to Google Bookmarks Add Adding+Comments+in+ASP to Stumbleupon Add Adding+Comments+in+ASP to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2013 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.

g


g features
Best uses for RSS

RSS and its future.

Force Download Dialog box with ASP

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor