Solved

how to write Server.HtmlEncode

Posted on 2013-06-28
4
305 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error on Add method 1 51
Create CSS Animation for Page Transitions 4 26
Mobile page Scrolling down when refreshing 4 33
Customizing jQuery UI Accordion CSS 3 16
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

803 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