Request页面传值

  protected void Button1_Click(object sender, EventArgs e)
        {
            string a = Page.Request["ID"];
           Response.Redirect("dy.ascx?name=a");

          
        }

接收

 protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = Request.QueryString["name"];

        }

或者

    protected void Button1_Click(object sender, EventArgs e)
        {
           Session["id"] = Page.Request["ID"];
           Response.Redirect("dy.ascx");
          
        }

接收

  protected void Page_Load(object sender, EventArgs e)
        {
                       
            Session["id"] = Label1.Text.ToString();
        }

posted @ 2014-03-14 14:01  914556495  阅读(305)  评论(0)    收藏  举报