AllExperts > Experts 
Search      

Active Server Pages Programming (ASP)

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Active Server Pages Programming (ASP) Answers
Question Library

Ask a question about Active Server Pages Programming (ASP)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Boster Sibande
Expertise
I can answer questions in the following areas: ASP.Net, VB.Net, C#.Net, Microsoft Access and SQL Server. These are the technologies I use in my day-to-day work. As such, I am very confident and happy to assist

Experience
I have two years experience with ASP.Net

Organizations
UNDP

Education/Credentials
Currently studying MSc. in IT

 
   

You are here:  Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > Syntax error I can't figure out...

Topic: Active Server Pages Programming (ASP)



Expert: Boster Sibande
Date: 1/30/2007
Subject: Syntax error I can't figure out...

Question
The web page is at http://hwc.ccc.edu/careerfair/ but the syntax error is in the ASP processing page where create the body of the email message that the processing page generates (see below for code...do you see a syntax error??):

body = "<b>Listed below is a 'summary' of your Spring 2007 HWC Career Fair Online Registration Information for April 26, 2007 career fair:</b> " & "<br><br>" &_
  "<b><u>Student First Name:</u></b> " & Request.Form("fname") & "<br>" &_
  "<b><u>Student Last Email:</u></b> " & Request.Form("lname") & "<br>" &_
  "<b><u>Student Address:</u></b> " & Request.Form("address1") & "', '" & Request.Form("address2") & "', '" & Request.Form("city") & "' '" & Request.Form("state") & "', '" & Request.Form("zipcode") & "<br>" &_
  "<b><u>Student Email Address:</u></b> " & Request.Form("email") & "<br>" &_
  "<b><u>Student Phone #:</u></b> " & Request.Form("phone") & "<br>" &_
  "<b><u>Student Course Major:</u></b> " & Request.Form("major") & "<br>" &_
  "<b><u>Student Gender:</u></b> " & Request.Form("gender") & "<br>" &_
  "<b><u>Student Academic Status:</u></b> " & Request.Form("astatus") & "<br>" &_
  "<b><u>Student Is A U.S. Citizen?</u></b> " & Request.Form("citizen") & "<br>"
  If Request.Form("ecode") <> "" Then
  "<b><u>Student Ethnicity Is?</u></b> " & Request.Form("ecode") & "<br>"
  Else
  "<b><u>Student Ethnicity Chosen By Student:</u></b> " & Request.Form("other") & "<br>"
  End If
  "<b><u>Is The Student Currently Working?</u></b> " & Request.Form("working") & "<br>"
  If Request.Form("working") = "Yes" Then
  "<b><u>What Is Student's Current Work Status (Full-Time/Part-Time)?</u></b> " & Request.Form("workstatus") & "<br>"
  Else
  "<b><u>What Is Student's Current Work Status (Full-Time/Part-Time)? Student currently isn't employed full-time or part-time.</u></b>" & "<br>"
  End If
  "<b><u>Student's Current Job Title:</u></b> " & Request.Form("cjtitle") & "<br>" &_
  "<b><u>Start Date of Students Current Job:</u></b> " & Request.Form("csdate") & "<br>" &_
  "<b><u>Salary of Students Current Job:</u></b> " & Request.Form("csalary") & "<br>" &_
  "<b><u>Company Name Where Student Currently Works At:</u></b> " & Request.Form("cjcname") & "<br>" &_
  "<b><u>Company Address Where Student Currently Works At:</u></b> " & Request.Form("cjcaddress") & "<br>" &_
  "<b><u>City/State/Zipcode Of Company Student Currently Works At:</u></b> " & Request.Form("csz1") & "<br>" &_
  "<b><u>Students Previous Job Title:</u></b> " & Request.Form("pjtitle") & "<br>" &_
  "<b><u>Start Date of Students Previous Job:</u></b> " & Request.Form("psdate") & "<br>" &_
  "<b><u>Salary of Students Previous Job:</u></b> " & Request.Form("psalary") & "<br>" &_
  "<b><u>Company Name Where Student Previously Worked At:</u></b> " & Request.Form("pjcname") & "<br>" &_
  "<b><u>Company Address Where Student Previously Worked At:</u></b> " & Request.Form("pjcaddress") & "<br>" &_
  "<b><u>City/State/Zipcode Of Company Student Previously Worked At:</u></b> " & Request.Form("csz2") & "<br>" &_
  "<b><u>Type of Work Student Currently Seeking?</u></b> " & Request.Form("twseeking") & "<br>" &_
  "<b><u>Student Is Seeking Part-Time or Full-Time Work?</u></b> " & Request.Form("tywkstatus") & "<br>" &_
  "<b><u>Interviewing Skills Workshop #1 Date Preference:</u></b> " & Request.Form("workshop1") & "<br>" &_
  "<b><u>Interviewing Skills Workshop #2 Date Preference:</u></b> " & Request.Form("workshop2") & "<br>" &_
  "<b><u>Resume Writing Workshop #1 Date Preference:</u></b> " & Request.Form("workshop3") & "<br>" &_
  "<b><u>Resume Writing Workshop #2 Date Preference:</u></b> " & Request.Form("workshop4") & "<br>" &_
  "<b><u>Date Online Registration Submitted:</u></b> " & datetoday & "<br>" &_
  "<b><u>Time Online Registration Submitted:</u></b> " & timetoday & "<br><br>" &_
  "<b>James Sloss Jr. - Harold Washington College Student Success Center Program Director, 312.553.3159 (jsloss@ccc.edu)</b>"  

Answer
The reason is that when starting a new line you are using &_. You need to put a space between & and _. For example, instead of
"<b><u>Student First Name:</u></b> " & Request.Form("fname") & "<br>" &_
Yoy should write
"<b><u>Student First Name:</u></b> " & Request.Form("fname") & "<br>" & _  

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.