Link to home
Start Free TrialLog in
Avatar of isnoend2001
isnoend2001Flag for United States of America

asked on

how to write Server.HtmlEncode

I am trying to validate this page: http://roofgenius.com/test2.asp
called from this page: http://roofgenius.com/test.asp
Evidently I need to add Server.HtmlEncode somwhere in 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 />"
   %>
    If any of this information is incorrect, please click the back button and change it.
We thank you for taking the time to help us be a better company.<br />
    <br />    
      Sincerely, <br />Manager, Roof Genius Customer Support
        <div style="text-align:right;margin-top:20px">             
      <a href="jmail.asp?<%=Request.QueryString%>">    
     <img src="images/buttonsubmit.gif" width="91" height="23" alt="Submit" title=""/> </a>  
      <a href="support.asp?<%=Request.QueryString%>">
      <img src="images/buttongoback.gif" width="91" height="23" alt="Go back" title=""/></a>




But how ?
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

This is what htmlencode does http://www.w3schools.com/asp/met_htmlencode.asp

Are you trying to validate your final html code or validate input?

What is the specific error you are having?
Avatar of isnoend2001

ASKER

I am trying to validate the source W3C on page2
see attached
errors.jpg
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks it validates, your the man