How to make ASP redirect to an HTML page

I have an ASP page that Inserts data into an MS Access database. After the data has been successfully entered it uses the following ASP code to give a successfull response.

Response.Write "Congratulations E Hoa Ma you have successfully registered with Nga Hapu O Nga Ruahine Iwi. click on the back button to return to the website !"

How do i make the ASP page redirect to an HTML page after successfully entering the data.
nikora1Asked:
Who is Participating?
 
GawaiCommented:
either
response.redirect("home.asp")

or


Response.Write "Congratulations E Hoa Ma you have successfully registered with Nga Hapu O Nga Ruahine Iwi. click on the back button to return to the website !"
Response.Write "<input type=""button"" value=""return"" onclick=""window.location='home.asp'"">"

this will work fine
0
 
HuyBDCommented:
You can you response.redirect("...") , in your case, try that

Response.Write "Congratulations E Hoa Ma you have successfully registered with Nga Hapu O Nga Ruahine Iwi. click on the back button to return to the website !"
Response.Write "<input type=""button"" value=""return"" onclick=""windows.location.href=""yourpage"""">"
0
 
srini5474Commented:
this eg would solve this question as well as your form validation question,

in this example i have written a code to vaildate the form and submit it if required fields are filled in. Once the required fileds as sucessfully filled in the form submits and directs you to DBinsert.asp page in which you can write code to insert into DB and gives a congartulation message followed by a button which will direct you to your home page.

<%@ language="javascript" %>
<html>
<head>
    <title>Untitled Page</title>
</head>
<script language="javascript">
function doSubmit(form)
{  
    if (IsEmpty(form.Topic.value)) {
        alert("Session Topic is a required field.");
        return(false);
      }
     return true;
}
function IsEmpty(str)
{
      return (str.length == 0);
}
</script>
<BODY>
<FORM ID="NewSchedule" NAME="NewSchedule" METHOD="POST" action="DBinsert.asp"
                  onsubmit="return doSubmit(this);">
<input type="text" name="Topic" />
<input type="submit" value="submit" />
</FORM>
</BODY>
</html>

// code for DBinsert.asp page

<%@ language="javascript" %>
<%
    // code your DB operations
    Response.Write("Congratulations E Hoa Ma you have successfully registered with Nga Hapu O Nga Ruahine Iwi. click on the back button to return to the website !");
    Response.Write ("<input type='button' value='return' onclick=window.location.href='home.htm'>");
   
%>

Hope this helps :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.