Código:
Gracias y un saludo. Public Shared numImagenes As Integer Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Not Page.IsPostBack Then numImagenes = 1 End If CargaImagenes() End Sub Private Sub CargaImagenes() For i As Integer = 1 To numImagenes Dim cImg As Control = Page.LoadControl("~/Controles/UpLoadImg.ascx") cImg.ID = "cImg" & i Me.pnlImagenes.Controls.Add(cImg) Next End Sub Private Sub lbMasImagenes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbMasImagenes.Click Dim cImg As Control = Page.LoadControl("~/Controles/UpLoadImg.ascx") cImg.ID = "cImg" & Me.pnlImagenes.Controls.Count Me.pnlImagenes.Controls.Add(cImg) numImagenes += 1 End Sub