Solved

how to write Server.HtmlEncode

Posted on 2013-06-28
4
307 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
  • 2
  • 2
4 Comments
 
LVL 52

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 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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 elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

820 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