Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to write Server.HtmlEncode

Posted on 2013-06-28
4
Medium Priority
?
318 Views
Last Modified: 2013-06-28
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 ?
0
Comment
Question by:isnoend2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39286178
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?
0
 

Author Comment

by:isnoend2001
ID: 39286200
I am trying to validate the source W3C on page2
see attached
errors.jpg
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 39286229
<div style="text-align:right;margin-top:20px">             
      <a href="jmail.asp?<%=Server.HTMLEncode(Request.QueryString)%>">    
     <img src="images/buttonsubmit.gif" width="91" height="23" alt="Submit" title=""/> </a>   
      <a href="support.asp?<%=Server.HTMLEncode(Request.QueryString)%>">
      <img src="images/buttongoback.gif" width="91" height="23" alt="Go back" title=""/></a>

Open in new window

0
 

Author Closing Comment

by:isnoend2001
ID: 39286230
thanks it validates, your the man
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating a CSS block that only applies to printing By default, all of your CSS applies to every possible view of your page - whether on screen, printed, landscape, touch-screen, or whatever.  You can, however, add CSS that only applies under certai…
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 viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Suggested Courses

721 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