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.
string1="Welcome to Plus2net.com "
string2="ASP section "
string=string1 + string2
Here two substrings 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
Be the first to post comment on this article :