Cant fire dropDownList selectionChange event from Backend
<p>I'm not able to fire the method on Selection-change. I'm adding the DropDownList itself from code behind. Code :</p>

<pre><code>  private TableCell CreateMTPLTypeCell(int insurerId, string MTPLType)
        {

            TableCell rg = new TableCell();
            rg.ID = string.Concat("rg_", insurerId);
            rg.CssClass = "formItem";
            //if (insurerId == 14)
            //{
                DropDownList ddl = new DropDownList();
                ddl.ID = "MTPLTypes";
                ddl.Items.Add(new ListItem("Standard", "1")); // add list items
                ddl.Items.Add(new ListItem("DubultOCTA", "2"));
                ddl.Items.Add(new ListItem("DubultOCTA+vējst", "3"));
                //ddl.SelectedIndex =
                //    ddl.Items.IndexOf(ddl.Items.
                //        FindByValue(MTPLType));
                ddl.SelectedIndexChanged += new EventHandler(MTPLType_selectedIndexChange);
                ddl.AutoPostBack = true;
                rg.Controls.Add(ddl);
            //}
            return rg;
        }

        void MTPLType_selectedIndexChange(object sender, EventArgs e)
        {
            DropDownList ddl = (DropDownList)sender;
            int insurerId = Int32.Parse(ddl.ID.Replace("rg_", ""));

            MTPLQuotes quotes = proposal.Properties.MtplQuotes[insurerId];
            if (quotes == null) return;

            proposal.GetSingleMTPLQuote(insurerId, Helpers.PortalUtilities.CurrentUser, BrokerInfo.GetBrokerInfo().Country.ID);

            DrawMtplQuotes(mtplPaymentMappingsCount &gt; 0);
        }
</code></pre>

<p>Do I miss some extra parameters on DropDownList object ?</p>

<p>Atm it works like that: After selectionChange it starts "loading" but it dosnt reach to the method. :/</p>

<p>In same class i have antoher tableCell with onChange event (Text_Change) -> this works ok.</p>

<pre><code>private TableCell CreateInsurerMtplDiscountCell(int insurerId, decimal discount)
    {
        TableCell c = new TableCell();
        c.CssClass = "formItem";
        c.Style[HtmlTextWriterStyle.PaddingLeft] = "25px";

        TextBox txt = new TextBox();
        txt.ID = string.Format("ins_disc_{0}", insurerId);
        txt.Text = discount &gt; 0 ? discount.ToString() : "";
        txt.TextChanged += new EventHandler(insurerDiscountPercent_TextChanged);
        txt.AutoPostBack = true;
        txt.Width = new Unit(40);
        c.Controls.Add(txt);

        Literal l = new Literal();
        l.Text = "%";
        c.Controls.Add(l);

        return c;
    }

    void insurerDiscountPercent_TextChanged(object sender, EventArgs e)
    {
        TextBox txt = (TextBox)sender;

        int insurerId = Int32.Parse(txt.ID.Replace("ins_disc_", ""));

        MTPLQuotes quotes = proposal.Properties.MtplQuotes[insurerId];
        if (quotes == null) return;

        decimal discountPercent;
        if (!Decimal.TryParse(txt.Text, out discountPercent))
            discountPercent = 0;

        quotes.InsurerDiscountPercent = discountPercent;
        foreach (MTPLQuote quote in quotes.Quotes)
            ApplyMtplInsurerDiscount(quote, discountPercent);

        DrawMtplQuotes(mtplPaymentMappingsCount &gt; 0);
    }
</code></pre>

<p>Got it fixed - The problem was about TableCell.ID (rg.ID = string.Concat("rg_", insurerId);) . After removing it everything worked fine. Anyone know why is that so ?</p>
