<form action="save.aspx" method="post" encType="multipart/form-data">
<input type="file" name="upfile"> 
<input type="text" value="abc123123123fdvasdfasd32424324234" name="QueryString">
<input type="submit" value="提交查询内容">
</form>在save.aspx里面处理提交过来的东西,保存到文件

解决方案 »

  1.   

    在save.aspx中写:
        string a=Request.Form["QueryString"].ToString();
        try
      { 
      using(StreamWriter sw=new StreamWriter(System.Web.HttpContext.Current.Server.MapPath("defa.htm"),false,System.Text.Encoding.GetEncoding("GB2312"))) 
       { 
      sw.WriteLine(a); 
        sw.Flush(); 
        sw.Close(); 
       } 
        } 
        catch
      { 
       Response.Write ("文件写入错误!"); 
      }
        finally 
        {
    Response.Redirect("r.htm");
         }