2.aspx代码:
<html>
<body>
<%
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
%>
<br>
</body>
</html>
1.aspx无论method=post还是get都不提交到2.aspx,即使2.aspx不存在也不提示出错,why? 用1.htm才可以成功提交,其代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<form name="form" method="GET" action="2.aspx">
<p><input type="text" name="Data1" size="20"></p>
<p><input type="text" name="Data2" size="20"></p>
<p><input type="submit" value="提交" name="B1"></p>
</form>
</body>
</html>
是不是asp.net下表单只能提交到本页即1.aspx只能提交到1.aspx?
本文地址:http://com.8s8s.com/it/it45381.htm