ASP.NET form表单提交处理
<form id="form1" runat="server" action="TempFile.aspx" method="post" onsubmit="return check();" >
使用POST方法将表单提交到TempFile.aspx 这个页面,表单中的内容有
<input type="text" name="title" class="inputtext" />
<input type="text" name="time" class="inputtext" />
<textarea name="content" id="content" cols="" rows="5" class="content"></textarea>
后台取数据
string title = Request.Form("title");
string time = Request.Form("time");
string content = Request.Form("content");
问题:
在执行 string title = Request.Form("title");报错
错误信息:方法取参数报错 不能像使用方法那样使用不可调用的成员“System.Web.HttpRequest.Form”。
各位大侠帮忙解决下。
附注:后台该怎么取表单中的数据 使用POST方法和GET 方法;为什么我使用 .ashx 后台文件不行了?