c#区分大小写是Request,付给一个变量就可以了

解决方案 »

  1.   

    if(Request.QueryString["Id"]==10)
    {
    }
      

  2.   

    楼上正确
    表单传过来的这样接收
    Request.Form["id"]
      

  3.   

    ///<summary>
    ///Aap.net中的到提交页面的参数的方法:
    ///</summary>
    调用参数用四种方法:
    1.
    Request.QueryString["Id"]
    2.
    HttpContext.Request.Params["Site"]
    3.
    //发出
    <form id="FormPost_1" action="rec1FormPost_2.aspx" method="post">
    </form>
    //接收
    Request.Form["text1"]
    4.
    //发出
    Server.Transfer("rec3FormPost_4.aspx");
    //接收
    if (Context.Handler is FormPost_3)
    {
    //取得页面对象
    FormPost_3 poster=(FormPost_3)Context.Handler;
    //取得控件
    Response.Write("Hello " + ((TextBox)poster.FindControl("TextBox1")).Text + "<p>");
    Response.Write("Hello " + poster.TextBox2.Text );
    }
      

  4.   

    if(Request.Params["ID"]!=null)
    {
    this.id = Int64.Parse(Request.Params["ID"]);
    }if(Request.Params["Id"]!=null)
    {
    this.id = Int64.Parse(Request.Params.Keys["ID"]);
    }