Join Strings in Classic ASP

Use the ampersand operator (&) to concatenate strings in VBScript. The + operator can also concatenate strings, but & is clearer because + is also the numeric addition operator.

Join two strings

Dim string1, string2, combined
string1="Welcome to Plus2net.com "
string2="ASP section"
combined=string1 + string2
Response.Write combined

The original + example is preserved above. For normal string concatenation, prefer &:

Response.Write "Welcome to Plus2net.com " & string2

Combine text with a function result

Response.Write "Present time is = " & Now()
If a value may be numeric, & avoids ambiguity between addition and concatenation.

ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer