simple ASP classic program is not working

时间:2015-12-14 17:55:17

标签: iis asp-classic

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 个答案:

答案 0 :(得分:6)

Could be you have a typo:

Responce.Write(x)

should be:

Response.Write(x)

答案 1 :(得分:2)

如果您只需要打印“text”变量:

  <html>
      <body>
          <form action="test.asp" method="post">
              <input type="text" name="text" />
              <input type="submit" value="submit" />
          </form>
          <%=Request.Form("text")%>
      </body>
  </html>
相关问题