Is it at all possible to dynamically create a Datagrid using a variable as it's name? I have tried and am either not doing something correct or it cannot be done. Please help. I have tried the following with no success.
Private Sub brunTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles brunTest.Click
Dim i As Integer
Dim strA As String
Dim strAi As String
strA = "dgDataGrid"
For i = 0 To 10
strAi = strA & i
Dim strAi as new Datagrid
Response.Write(strAi)
Response.Write("<br>")
Next
End Sub
Private Sub brunTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles brunTest.Click
Dim i As Integer
Dim strA As String
Dim strAi As String
strA = "dgDataGrid"
For i = 0 To 10
strAi = strA & i
Dim strAi as new Datagrid
Response.Write(strAi)
Response.Write("<br>")
Next
End Sub