Select Option Change DropdownList C# ASP.NET Fire Event
<p>I have a drop down list in asp.net When I click on an option, I should get the value selected then pass it to a database and later use the query results to populate a second drop down list.</p>

<p>I seem not to be able to "fire" this event when I click on the first drop down menu. Below is what I have:</p>

<p><strong>ASPX Code</strong> </p>

<pre><code>&lt;td class="style3"&gt;
                &lt;asp:DropDownList ID="Currencies" runat="server" 
                    onselectedindexchanged="Currencies_SelectedIndexChanged"&gt;
                &lt;/asp:DropDownList&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="style2"&gt;
                Payment Mode&lt;/td&gt;
            &lt;td class="style3"&gt;
                &lt;asp:DropDownList ID="PaymentModes" runat="server"&gt;
                &lt;/asp:DropDownList&gt;
            &lt;/td&gt; 
</code></pre>

<p><strong>CodeBehind code C#</strong> </p>

<pre><code>String conn = WebConfigurationManager.ConnectionStrings["pvconn"].ToString();
    protected void Page_Load(object sender, EventArgs e)
    {
        populatecurrencylist();

    }

    public void populatecurrencylist() 
    {
        SqlCommand sql = new SqlCommand("SELECT * FROM CURRENCIES_TBL ORDER BY Currency_Initials",new SqlConnection(conn));
        sql.Connection.Open();
        SqlDataReader listcurrencies;
        listcurrencies = sql.ExecuteReader();
        Currencies.DataSource = listcurrencies;
        Currencies.DataTextField = "Currency_Initials";
        Currencies.DataValueField = "Currency_Group_ID";
        Currencies.DataBind();
        sql.Connection.Close();
        sql.Connection.Dispose();
    }

    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }
    protected void Currencies_SelectedIndexChanged(object sender, EventArgs e)
    {
        var currid = Currencies.SelectedValue;
        HttpContext.Current.Response.Write(currid);
        //int currid = 0;
        try
        {
            SqlCommand sql = new SqlCommand("SELECT * FROM PAYMENT_MODES_TBL WHERE Currency_ID = @currencyid", new SqlConnection(conn));
            SqlParameter param0 = new SqlParameter();
            param0.ParameterName = "@currencyid";
            param0.SqlDbType = System.Data.SqlDbType.Int;
            param0.Value = currid;

            sql.Parameters.Add(param0);
            sql.Connection.Open();
            SqlDataReader listpaymodes;
            listpaymodes = sql.ExecuteReader();
            PaymentModes.DataSource = listpaymodes;
            PaymentModes.DataTextField = "Payment_Mode";
            PaymentModes.DataValueField = "Paying_Account_Code";
            PaymentModes.DataBind();
            sql.Connection.Close();
            sql.Connection.Dispose();
        }
        catch(Exception s)
        {
            HttpContext.Current.Response.Write("Error Occured " + s.Message);
        }            
    } 
</code></pre>

<p>I can populate the first dropdownlist without a problem. The second one is what seems not to work. Very new in ASP.NET. I come from a PHP background where this would be achieved easily using jquery ajax, but I want to learn C#.</p>

<p>Any help appreciated.</p>

<p><strong>EDIT</strong> </p>

<p>All the answers suggest that I make the currencies dropdown list to <strong><code>AutoPostBack = true</code></strong> 
I have done that: </p>

<pre><code>&lt;asp:DropDownList ID="Currencies" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="Currencies_SelectedIndexChanged"&gt;
                &lt;/asp:DropDownList&gt; 
</code></pre>

<p>But it still seems not to work. On a side note, the page reloads and my select menu option gets reset to the first option.  </p>
