just can add limited dynamically user control in updatepanel

Sorry for my language problem :D

I've written below code and I have no problem with that but I can add more than 6 user control(DriverInfo.ascx) dynamically.

I've tried a simpler code with a single textbox instead of user control but it does not work for more than 30 textbox. I don't know whats the problem and got confused. what is the problem?

AddDynamicDriver.ascx:

<%@ Control Language="C#" AutoEventWireup="true" 
    CodeBehind="AddDynamicDirver.ascx.cs"
    Inherits="Terminal.UI.TransportCo.WebControls.AddDynamicDirver" %>
<div dir="rtl">
    <asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
           <asp:Panel ID="Panelmain" runat="server">
           </asp:Panel>
           <asp:Button ID="AddDriver" runat="server" Text="adddriver" 
               onclick="AddDriver_Click" />
        </ContentTemplate>
    </asp:UpdatePanel>
</div>

addDynamicDriver.ascx.cs:

protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        Session["DynamicDriverNumber"] = 1;
        LoadCreatedControl();
    }
}

private void LoadCreatedControl()
{
    var number = (int)Session["DynamicDriverNumber"];
    for (int i = 1; i <= number; i++)
    {
        var driver = new Control();
        driver = LoadControl("DriverInfo.ascx");
        driver.ID = "Driver" + i;
        Panelmain.Controls.Add(driver);
        Panelmain.Controls.Add(new LiteralControl("<hr/>"));
    }

public void AddDriver_Click(object sender, EventArgs e)
{
    var number = (int)Session["DynamicDriverNumber"];
    number++;
    Session["DynamicDriverNumber"] = number;
    LoadCreatedControl();
}

It's a Firefox problem as it works in IE. Why?!


ANSWERS:


You need to invoke Update() method after the content of UpdatePanel is modified by the postback event handlers.



 MORE:


 ? How to add a button control dynamically into a GridView cell ? VB.NET
 ? Dynamically added button click event fire only once
 ? Dynamic Button Click in Table
 ? Create onClick event for dynamically created button asp.net
 ? Dynamically Add Click event to asp button
 ? Dynamically Add Click event to asp button
 ? Dynamically Add Click event to asp button
 ? Button Click Event Getting Lost
 ? Dynamically assign button events in c# asp.net
 ? how to create an asp button dynamically and add event to it