<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 后台文件不行了?

解决方案 »

  1.   

    改了之后报这样的错误:
    验证视图状态 MAC 失败。如果此应用程序由网络场或群集承载,请确保 <machineKey> 配置指定了相同的 validationKey 和验证算法。不能在群集中使用 AutoGenerate。
      

  2.   

    .ashx 后台文件中
    var context = HttpContext.Current;
    用context.Request.Form[]
      

  3.   

    将数据提交到后台使用 .ashx 文件处理,结果报以下错误:
    HTTP Error 403 - Forbidden. 接下来该如何处理??如果将数据提交到同一个界面该怎么处理?