Wednesday 30 November 2011

SPECIAL CHARACTERS

When you use Active Server Pages, there are many special characters that you need to be aware of. Here is a list and description of the most common:

'

The single quotation mark signifies a comment within ASP code. Comments are generally used for organizational purposes in web design so that webmasters can share work easily and check for bugs in their system

&

The ampersand symbol is a concatenation operator that is used to combine two expressions into a string result. Here is an example from our ASPEmail script:
Mail.Body = "Email: " & strEmail & vbCrLf & "Name: " & strName

_

The underscore signifies that a one single piece of code is being written on more than one line. In ASP, many portions of code are designed to be written on one single line. If the line becomes too long and runs off the page, you can simple enter an underscore at the end of the line, return to the next line, and then continue writing your code. Although the code is written on more than one line, it will still function as one line of code.

vbCrLf

vbCrLf simply returns to the next line. This is most commonly used when displaying data such as in an email message. If you have two form fields that you want to display on separate lines in an email, simply add a vbCrLf between their code in your ASP page.

http://www.aspwebpro.com/tutorials/asp/specialcharacters.asp

No comments:

Post a Comment