Solved

Problem tryinq to validate confirmation page

Posted on 2013-06-28
7
227 Views
Last Modified: 2013-06-28
I have this page: http://roofgenius.com/test.asp where a user can enter a message
when submitted it sends the values to this page:
http://roofgenius.com/test2.asp
On this page the user can see the values they have entered and can either accept them or go back to the prior page and make corrections
http://roofgenius.com/test.asp Validates,but
http://roofgenius.com/test2.asp gives 8 errors all similar
Example:
 Line 184, Column 43: & did not start a character reference. (& probably should have been escaped as &.)

…  <a href="jmail.asp?name=Robert+Moore&email=Service%40roofgenius.com&comment=…
see attached example of errors
How can i correct this?
errors.jpg
0
Comment
Question by:isnoend2001
  • 4
  • 3
7 Comments
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39284755
You need to replace all instances of & in the url with &amp;
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39284773
So on your button links - when creating the button you need to look at

HttpUtility.HtmlEncode

Also - consider using sessions / cookies to store the form data for the back button that way you don't need to "remember" it on the button link back. You can just pull it from the session.
0
 

Author Comment

by:isnoend2001
ID: 39284898
Thanks  julianH,but i get this error

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/test2.asp, line 125

response.write "Dear: " &amp; name &amp; ",<br />Thank you for sending us the following:"


i don't understand this: HttpUtility.HtmlEncode
also what if the user has cookies disabled
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 51

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 39284946
response.write "Dear: " &amp; name &amp; ",<br />Thank you for sending us the following:"

No - not in your code - in your output when you create the links for the buttons you need to convert all the & to &amp; in the URL.

HtmlEncode will do this for you refer

http://msdn.microsoft.com/en-us/library/w3te6wfz.aspx

If people have cookies disabled then they will have problems accessing a lot of sites - just a suggestion - it is very common practice to use cookies / sessions to do what you are doing.
0
 

Author Comment

by:isnoend2001
ID: 39284967
not sure what you mean, but i will check
0
 

Author Closing Comment

by:isnoend2001
ID: 39285156
I have not fixed this issue, but have to run some errands and i like to stay involved.
I think this needs to be configured to use response.write(Server.HTMLEncode
on this code:

 <% name = request.querystring("name")
  response.write "Dear: "& name & ",<br />Thank you for sending us the following:"
  comment = request.querystring("comment")
  comment = Replace(comment, vbcrlf, "<br />")
   response.write "<br />" & comment & "<br /><br />If you have asked us to contact you, we will be using the following email address:<br>"

  email = request.querystring("email")
  response.write "<span class=""redbold""> Email : " & email & "</span><br /><br />"
   %>
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39285379
No - it is what comes after that - for the actual button.

Where you output this code
 <a href="jmail.asp?name=...

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Basic CSS issues 24 34
Swiper slider stops between pages 11 32
CSS grid style change 2 14
Re-position sub-options beneath the TAB 7 42
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now