提交表单时我没有收到任何数据。我会期待Request.Form.Count=2
,但相反RequestForm.Count=0
。
任何援助将不胜感激。
<%@ Page Language="VB" EnableViewState="false" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="ecomm_Default2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<form id="form1" method="post">
<input id="textfield" type="text" value="My Text" />
<input type="submit" value="Send it" />
</form>
</body>
</html>
部分代码
Imports System.Diagnostics
Partial Class ecomm_Default2
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Request.HttpMethod = "POST" Then
Debug.WriteLine(Request.Form.Count)
End If
End Sub
End Class