-1

I'm new to ASP very recently and I can't seem to get this to work

<html>
<body>
<form action="test.asp" method="post">
<input type="text" name="text" />
<input type="submit" value="submit" />
</form>
<%
dim x
x=Request.Form("text")
Responce.Write(x)
%>
</body>
</html>

The text box and submit button are displayed however this error is displayed and this ASP does not work.I'm not sure if something is wrong with my code or IIS. Any help on this would be much appreciated

An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
  • 2
    You should really activate errors while coding, typos are common... :) See http://stackoverflow.com/questions/1453791/classic-asp-on-iis7-refusing-to-send-errors-to-browser-on-500-internal-server-e – gpinkas Dec 14 '15 at 19:53

2 Answers2

6

Could be you have a typo:

Responce.Write(x)

should be:

Response.Write(x)
Alan McBee
  • 4,202
  • 3
  • 33
  • 38
2

If you just need to print your "text" variable:

  <html>
      <body>
          <form action="test.asp" method="post">
              <input type="text" name="text" />
              <input type="submit" value="submit" />
          </form>
          <%=Request.Form("text")%>
      </body>
  </html>
Vixed
  • 3,429
  • 5
  • 37
  • 68