ASP.NET下的表单提交问题 (转)[@more@]1.
ASPx代码:
id="compute" methode="POST" action="2. aspx" runat="server" >
id="Data1" runat="server" />+
id="Data2" runat="server" />=?
id="submit" runat="server" text="提交" />
dim intData1
dim intData2
if request.querystring("Data1")<>" " and request.querystring("Data2")<>" " then
intData1=cint(request.querystring("Data1"))
intData2=cint(request.querystring("Data2"))
response.write(intData1)
response.write("+")
response.write(intData2)
response.write("=")
response.write(intData1 + intData2)
end if
%>
http-equiv="Content-Type" content="text/html; charset=gb2312">
name="GENERATOR" content=" microsoft FrontPage 4.0">
name="ProgId" content="FrontPage.Editor.Document">
New Page 1
name="form" method="GET" action="2.aspx">
id="compute" methode="POST" action="2. aspx" runat="server" >
id="Data1" runat="server" />+
id="Data2" runat="server" />=?
id="submit" runat="server" text="提交" />
2.aspx代码:
dim intData1
dim intData2
if request.querystring("Data1")<>" " and request.querystring("Data2")<>" " then
intData1=cint(request.querystring("Data1"))
intData2=cint(request.querystring("Data2"))
response.write(intData1)
response.write("+")
response.write(intData2)
response.write("=")
response.write(intData1 + intData2)
end if
%>
1.aspx无论method=post还是get都不提交到2.aspx,即使2.aspx不存在也不提示出错,why? 用1.htm才可以成功提交,其代码如下:
http-equiv="Content-Type" content="text/html; charset=gb2312">
name="GENERATOR" content=" microsoft FrontPage 4.0">
name="ProgId" content="FrontPage.Editor.Document">
New Page 1
name="form" method="GET" action="2.aspx">
type="text" name="Data1" size="20">
type="text" name="Data2" size="20">
type="submit" value="提交" name="B1">
是不是ASP.NET下表单只能提交到本页即1.aspx只能提交到1.aspx?
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10752043/viewspace-962656/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10752043/viewspace-962656/