SQL PHP HTML ASP JavaScript articles and free scripts to download
 

ASP string addition using + and &

We can add two strings in VBScript inside ASP by suing a plus ( + ) symbol. Two strings can be joined like this and a result string can be printed. Here is an example of adding two strings.

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


Here two strings are added and stored in another variable. The new variable with both the string values is displayed.

We can display a string along with another string like this.

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


Same way we can display present time along with a string. Here we have to add the two by using ampersand ( & )

Response.Write "Present time is = " & now()


Read similar function on string adding in PHP
Further readings
Adding two or more strings in ASP
Getting the size or length of the string by using len() function
Removing blank space before and after a string using trim function
Changing lower to upper or upper to lower case of text present inside a string
Reversing a string variable by using StrReverse function
Compare two strings in different ways by using StrComp function
Collecting parts from Left , right and middle areas of a string
Checking matching of a string inside another string using InStr function
Searching and replacing strings inside another string using Replace function
Creating arrays by splitting string using split() function
Joining elements of an array to create a string variable
 
Scripts
PHP
JavaScript
All ASP Tutorials
Popular Tutorials
Managing two drop downs
ASP Tutorials
Date and time
Declaring array
Form in ASP
Server.MapPath
Date Time & MSSQL
Select Query
File System Object
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.