Nello UC il metodo di cambio label deve essere pubblico, anzi a dire la verita' dovrebbe esserci una proprieta' con Set e Get che setta il suo testo, sempre pubblica.
comunque:codice:Public Property TestoLabel() as String Get Return idLabel.Text End Get Set(ByVal Value as String) idLabel.Text = Value End Set End Property
codice:Dim uc as New UserControl uc= LoadControl("/ctlProva.ascx") If Not IsNothing(uc) Then uc.ID = "uc" & i uc.TestoLabel = "ProvaSettaggioTesto" 'uc. etc etc tutte le proprieta' ed i metodi che vuoi myPlaceHolder.Controls.Add(uc) End if

Rispondi quotando