我已经动态添加了一个 WebUserControl,然后我想得到它,这是我的故事 :( 我不知道该怎么做,这是我的代码,在此先感谢,
Protected Sub btngenerate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btngenerate.Click
For Each Str As String In Tstring
Dim addressControl As WebUC = CType(LoadControl("WebUC.ascx"), WebUC)
addressControl.plbl.Text = Str
form1.Controls.Add(addressControl)
Next
End Sub
Protected Sub btnOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOk.Click
'here is what i did , but it didn't work
'For Each ct As WebUCIn form1.Controls
' ltlres.Text = ltlres.Text & ", " & ct.plbl.Text & " " & ct.ptxt.Text
'Next
End Sub