Codefixer - ASP tutorials, resources and software
ASP.NET 3.5/2.0 Hosting – Click Here
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Saturday 17 May
MembersPro PayPal - ASP Membership software

asp.netPRO “Best ASP.NET Host” – DiscountASP.NET


ASP Partner ASP Partner ASP Partner more partners...

Concatenating Strings in ASP/VBScript

In ASP you concatenate strings with the use of the ampersand (&) placed between the strings that you wish to join. For example think of a scenario where you had the firstname and lastname of a customer stored in separate variables and you wished to join and display them as one string.

The example below creates two variables sFirstName and sLastName and assigns them values. We then write them to the browser combining all the strings using ampersands. Notice the space character between the variables sFirstName and sLastName, this is just used for formatting purposes.

Example 1:

<%
'Declare variables
Dim sFirstName, sLastName
sFirstName ="John"
sLastName="Doe"
Response.write "Customer name is " & sFirstName & " " & sLastName
%>

The result:
Customer name is John Doe

LinksPro - Directory  and Link  Management Software




ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software