Never tested on this, but you could try something like this:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int occurence =1;
ViewState["Counter"] = occurence;
LoadUserControl();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if(ViewState["Counter"] != null){
int count = Convert.ToInt32(ViewState["Counter"]);
ViewState["Counter"] = count + 1;
LoadUserControl();
}
}
protected void LoadUserControl()
{
int count = Convert.ToInt32(ViewState["Counter"]);
if (count > 0)
{
for (int i = 0; i < count; i++)
{
WebUserControl uc = (WebUserControl)Page.LoadControl("WebUserControl.ascx");
webUC.ID = "webUC" + i.ToString();
form1.Controls.Add(uc);
}
}
}
Keep in mind that the code above is just a quick example, so be careful when using ViewState to avoid page performance issue. Also ViewState has a limit when it comes to size, so make sure that you don't store a huge amount of data in it.
I would also suggest you to read on Dynamic Controls creation and Page cycle events.
HTH