Save selected value of a dropdown list in a global variable
<p>I am trying to save the dropdown list selected value in a glbal variable .. I have lots of country on the dropdown list , whan I choose one of them and press a button :</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
    {
        Button2.Enabled = true;
        Button2.Visible = true;
        DropDownList1.Visible = true;

        DropDownList9.Items.Clear();


        if (!Class1.Search_Continent.Equals("-"))
        {
            SqlConnection conn1 = new SqlConnection(@"Data Source=AK-PC\MSSQLSERVER1;Initial Catalog=DB;Integrated Security=True");
            conn1.Open();
            SqlCommand cmd1 = new SqlCommand("Select Country_name FROM Country WHERE Continent_name='" + DropDownList1.SelectedValue + "'", conn1);
            SqlDataReader dr1;
            dr1 = cmd1.ExecuteReader();

            while (dr1.Read())
            { DropDownList9.Items.Add(dr1["Country_name"].ToString() + "\n"); }

            dr1.Close();
            conn1.Close();
</code></pre>

<p>}</p>

<pre><code>protected void Button2_Click(object sender, EventArgs e)
    {
        // Redirect to Country page
        Class1.CountryName = DropDownList9.SelectedValue.ToString();
        Response.Redirect("Country.aspx", true);
    }
</code></pre>

<p>it doesnt take the selected value ! it always take the first value of the dropdown list !
Please help me !</p>
