下面是我的asp代码:
<%@ Language = Python%>
<%
def main():
a = Request("btnSubmit")
main()
%>这给了我一个错误:
Error Type:
Python ActiveX Scripting Engine (0x80020009)
Traceback (most recent call last): File "<Script Block >", line 3, in <module> main() File "<Script Block >", line 2, in main a = Request("btnSubmit") TypeError: 'NamedScriptAttribute' object is not callable
/website/test.asp, line 4
a = Request("btnSubmit")
Browser Type:
Mozilla/5.0 (Windows NT 5.1; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Page:
GET /website/test.asp你知道为什么我会得到这个错误吗?
我已经设法让这个脚本正常工作了:
<%@ Language = Python%>
<%
def main():
Response.Write("My first ASP script!")
main()
%>就像使用VBScript的这个一样:
<%
a = Request("btnSubmit")
%>问题是,我正在工作的项目计划在不久的将来移植到ASP .NET,这是我更熟悉的。然而,就在现在,我需要去抓住ASP经典。然而,当我看到如何使用VBScript实现这些东西时,我几乎要哭了,我想一定有更好的方法来做这件事。这就是如果可能的话,我想使用Python的原因。但是它是稳定的吗?这样的努力值得吗?请给我建议。
谢谢,
巴里
发布于 2012-02-08 22:18:59
我认为这就是我应该做的:
<%@ Language = Python%>
<%
def main():
a = Request.QueryString["btnSubmit"]
main()
%>我不确定Request("btnSubmit")实际上在做什么,因为这里没有记录:
http://www.w3schools.com/asp/asp_ref_request.asp
https://stackoverflow.com/questions/9164128
复制相似问题