0
我需要在ASPX(VB版本)中讀取POST方法中的變量。用ASPX讀取POST變量vb.net
下面的代碼:
<!DOCTYPE html>
<html>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write("[POST]<br />")
For Each s As String In Request.Form.AllKeys
Response.Write("[Request.Form] " & s & ": " & Request.Form(s) & "<br />")
Next
Response.Write("[GET] <br />")
For Each a As String In Request.QueryString.AllKeys
Response.Write("[Request.QueryString] " & a & ": " & Request(a) & "<br />")
Next
End Sub
</script>
<body>
<form action="demo_simpleform.aspx" method="post">
<input name="infob" type="text" value="POST" id="infob" disabled />
<input name="TextBox1" type="text" value="" id="TextBox1" />
<input name="TextBox2" type="password" id="TextBox2" />
<input type="submit" value="Method POST" />
</form>
<form action="demo_simpleform.aspx" method="get">
<input name="infoa" type="text" value="GET" id="infoa" disabled />
<input name="TextBox1a" type="text" value="" id="TextBox1a" />
<input name="TextBox2a" type="password" id="TextBox2a"/>
<input type="submit" value="Method GET"/>
</form>
</body>
</html>
爲什麼我無法讀取POST變量?怎麼了? 幫助我,請
那你試試?你的意思是「不能」? – Noy