ASP.NET下的表单提交问题

1.aspx代码:

 1<html>
 2<body>
 3<form __="" action="2.aspx" id="compute" methode="POST" runat="server">
 4<asp:textbox __="" id="Data1" runat="server"></asp:textbox>\+   
 5<asp:textbox __="" id="Data2" runat="server"></asp:textbox>=?   
 6<br/>
 7<asp:button __="" id="submit" runat="server" text="提交"></asp:button>
 8</form>
 9</body>
10</html>

2.aspx代码:

1<html>
2<body>   

dim __ intData1
dim __ intData2
if __ request.querystring("Data1")&lt;&gt;" __ " __ and __ request.querystring("Data2")&lt;&gt;" __ " __ 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<br/>
2</body>
3</html>

1.aspx无论method=post还是get都不提交到2.aspx,即使2.aspx不存在也不提示出错,why? 用1.htm才可以成功提交,其代码如下:

 1<html>
 2<head>
 3<meta __="" content="text/html; __ charset=gb2312" http-equiv="Content-Type"/>
 4<meta __="" content="Microsoft __ FrontPage __ 4.0" name="GENERATOR"/>
 5<meta __="" content="FrontPage.Editor.Document" name="ProgId"/>
 6<title>New __ Page __ 1</title>
 7</head>
 8<body>
 9<form __="" action="2.aspx" method="GET" name="form">   
10__ __ <p><input __="" name="Data1" size="20" type="text"/></p>   
11__ __ <p><input __="" name="Data2" size="20" type="text"/></p>   
12__ __ <p><input __="" name="B1" type="submit" value="提交"/></p>
13</form>
14</body>
15</html>

是不是asp.net下表单只能提交到本页即1.aspx只能提交到1.aspx?

Published At
Categories with Web编程
Tagged with
comments powered by Disqus