I have a simple question in asp.net.
I want to know if it is possible to get data from controls in my user control directly . I want to do it without using Session variable,Viewstate ...

EDIT: I now use the method of declaring public variables in the UC.

Here is a part of Page\_load from my parent page:

```
 this.plan_action = (UCPlan)Page.LoadControl("~/Association/UCPlan.ascx");
 PlaceHolder1.Controls.Add(this.plan_action);

 if (this.plan_action.Validate == true)
        {
            CheckBox1.Checked = true;
            //String référence = Session["liste_action"].ToString();

            for (int i = 0; i < this.plan_action.List1.Count; i++)
            {
                Label8.Text += this.plan_action.List1[i].Référence + "/";
                //Label8.Text += "/";
            }

        }

```

but my variable validate stay to false.

Here is the code where I change the value of the validate variable with it declaration:

```
    private bool validate;

    public bool Validate
    {
        get { return validate; }
        set { validate = value; }
    }

 protected void Button2_Click(object sender, EventArgs e)
      {

          //myCommand.Connection = myConnection;
          //Session["liste_action"] = this.List;
          this.Validate = true;
          //Response.Redirect("../Risques_folder/AjouterRisque.aspx");

      }

```

Thank you for your help,

Quentin