isnoend2001
asked on
Problem tryinq to validate confirmation page
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=Rober t+Moore&em ail=Servic e%40roofge nius.com&c omment=…
see attached example of errors
How can i correct this?
errors.jpg
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=Rober
see attached example of errors
How can i correct this?
errors.jpg
You need to replace all instances of & in the url with &
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.
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.
ASKER
Thanks julianH,but i get this error
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/test2.asp, line 125
response.write "Dear: " & name & ",<br />Thank you for sending us the following:"
i don't understand this: HttpUtility.HtmlEncode
also what if the user has cookies disabled
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/test2.asp, line 125
response.write "Dear: " & name & ",<br />Thank you for sending us the following:"
i don't understand this: HttpUtility.HtmlEncode
also what if the user has cookies disabled
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
not sure what you mean, but i will check
ASKER
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.HTML Encode
on this code:
<% name = request.querystring("name" )
response.write "Dear: "& name & ",<br />Thank you for sending us the following:"
comment = request.querystring("comme nt")
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 />"
%>
I think this needs to be configured to use response.write(Server.HTML
on this code:
<% name = request.querystring("name"
response.write "Dear: "& name & ",<br />Thank you for sending us the following:"
comment = request.querystring("comme
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 />"
%>
No - it is what comes after that - for the actual button.
Where you output this code
Where you output this code
<a href="jmail.asp?name=...