ASP.NET form表单提交处理

Pbingbing Pbingbing 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<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 后台文件不行了?


...全文
评论 6
收藏 已收藏
分享
返回顶部
Pbingbing
.NET社区 62,271 成员 668,968 内容