【问题标题】:Equivalient of ISSET in ASP (Classic ASP)ASP 中 ISSET 的等价物(经典 ASP)
【发布时间】:2016-02-09 05:12:42
【问题描述】:

好的,下午好。

我刚开始使用 ASP。 在 php 我做这样的事情

<?php 
If(isset($_POST["submit"]))
{
    echo "You clicked me yeh?";
 }
?>

工作没有问题,现在我尝试为 ASP 翻译相同的内容,我做了类似的事情

<html>
<head>
<title>testHome in ASP</title>
<body>
<% 

if Request.Form("submit") ="test" then
    Response.Write("Ok Mate You Just Clicked Me!")
%>
<form name = "superform" id="superform" method="post" action="idc.asp">
<input type="submit" name="submit" value="test"/>
</form>
</body>
</head>
</html>

相反,我得到了这个超级烦人的错误。

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.

请问这里的错误是什么?

【问题讨论】:

标签: asp-classic


【解决方案1】:

你需要关闭'if ... then'

end if

如果可以,可以让 IIS 向浏览器发送错误消息:IIS6IIS7

如果你使用 Visual Studio,你也可以setup debugging

【讨论】:

  • 你非常感谢一百万!
  • @RickTowers:您也可以将if Request.Form("submit") ="test" then Response.Write("Ok Mate You Just Clicked Me!") 全部放在一行中。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-12-19
  • 2018-11-19
  • 2012-01-24
  • 2015-05-06
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多