I have made the label below using response.write.
And this works fine.Code:dim i as integer for i = 1 to 10 response.write("<asp:label id='Label99" & i & "' runat='server'> <b>Test" & i & "</b></asp:label>") next
But if I wish to change the text of the label using a button I can't make it work, nothing happens. Isn't this possible? Otherwise I think it's impossible to make some automated code generation in ASP.Net.
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim label991 As New Label() Label991.Text = "HPL" End Sub


Reply With Quote