The first part of my asp file is working, but I have to concatenate the variables and add text to read this. My name is Joe Blow. I live at 123 easy street in Pine Bluff, AR 71601. My phone number is (870) 123-4567 and my Email address is . I do not know where to put what. I think I have part of it figured out and I am using the book Beginning Active Server Pages 3.0. Can someone take a look at this soon. It is due tonight by midnight. I think I almost have it but do not know how to make a space. The book says to do this & " " . But if you load it on the server it doesn't have the space. I need to add the address, phone and email to this also to concatenate the rest of the variables.
Thanks for your help.
Ok here is my file.

<%Option Explicit%>


<html>
<head>
<title> Five variables</title>
</head>
<body bgcolor="ffffcc">

<%
Dim strfullname, straddress, strcitystatezip, strphone,

strEmail
strfullname = ("Joe Blow")
straddress = ("123 Easy Street")
strcitystatezip = ("Pine Bluff, Arkansas 71601")
strphone = ("(870) 123-4567")
strphone = ("")

Response.write "<br>"
Response.write strfullname
Response.write "<br>"
Response.write straddress
Response.write "<br>"
Response.write strcitystatezip
Response.write "<br>"
Response.write strphone
Response.write "<br>"
Response.write strEmail
Response.write "<br>"
Response.write("My name is" & " " & strfullname )
%>


</body>
</html>

Dani AI

Generated

Quick diagnosis and a clean fix for the problems in the thread: the page shows three common issues — the variable list in your Dim was split (so some names weren’t actually declared), the phone variable was accidentally overwritten with the email, and the output can be simplified by building one concatenated string instead of many separate Response.Write calls. was right that composing a single message string is cleaner; ’s file looks like it just needs small fixes to variable names and quoting for the anchor tag.

Example corrected snippet (classic ASP / VBScript):

<%
Option Explicit
Dim fullName, addressLine, cityStateZip, phoneNumber, emailLink, message

fullName = "Jane Smith"
addressLine = "456 Elm St"
cityStateZip = "Springfield, IL 62704"
phoneNumber = "(312) 555-1212"
emailLink = "<a href=""mailto:jane.smith@example.com"">jane.smith@example.com</a>"

message = "My name is " & fullName & ". I live at " & addressLine & " in " & cityStateZip & ". My phone is " & phoneNumber & " and my email is " & emailLink & "."
Response.Write message
%>

Notes and troubleshooting tips:

  • Make sure all variable names appear on the same Dim line (no stray commas or lone names on the next line). With Option Explicit any undeclared name raises an error.
  • Don’t accidentally assign the email to the phone variable — use a distinct email variable.
  • When embedding double quotes inside a VBScript string, double them ("") as shown for the href attribute.
  • For spacing, include the space in the literal (for example "My name is "), or concatenate a single-space string (" "). If a space still doesn’t appear, view the page source to verify the rendered HTML — browsers collapse whitespace inside tags, so be sure spaces are in the text nodes.
  • During development enable detailed ASP errors in IIS (only on your dev machine) to catch typos and undeclared variables quickly.

Response.write "<br>"
Response.write strfullname
Response.write "<br>"
Response.write straddress
Response.write "<br>"
Response.write strcitystatezip
Response.write "<br>"
Response.write strphone
Response.write "<br>"
Response.write strEmail
Response.write "<br>"
Response.write("My name is" & " " & strfullname )

yeah thats right in simple terms (again not sure about the use of brackets, it is not a function response.write is a procedure)

mMessage = "My Name is " & strFullname & " I Live at " & straddress & " in " & strcitystatezip etc etc....

response.write mMessage

strEmail
strfullname = ("Joe Blow")
straddress = ("123 Easy Street")
strcitystatezip = ("Pine Bluff, Arkansas 71601")
strphone = ("(870) 123-4567")
strphone = ("")

although that looks a bit messy you are not even defining strEmail, and I have never used brackets.

strEmail = ""
strfullname = "Joe Blow"
straddress = "123 Easy Street"
strcitystatezip = "Pine Bluff, Arkansas 71601"
strphone = "(870) 123-4567"
strphone = ""

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.