Morning All!
I'm hoping that somebody can help me with this, I tried in the VB.net forum yesterday and it was suggested I try here!
What I would like to do is dynamically generate textboxes. These textboxes are generated depending on the selected value in a radiobutton list within a webform, for example, if the selected value in the radiobutton list is '4' then 4 textboxes are generated.
I have some coding done, but I'm not too sure 1) if it is correct and 2) how do I get the textboxes to show on the form? The radiobutton list is set so that AUTOPOSTBACK = TRUE as I need the textbox values after the user clicks the SUBMIT button.
Here is my coding so far for the textboxes:
Public Sub LettersFound(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim i As Integer
Dim LettersFound As TextBox
For i = 1 To "No_Letters"
'LettersFound.Visible.ToString()
'LetFoundTable(LettersFound.Text)
i = i + 1
'Response.Write("This is the number of text boxes that should be shown" + "' & i & '")
Next
End Sub
Where "No_Letters" is the name of the radiobutton list. The maximum number of textboxes to be drawn is 12 if that helps?
The bits that are commented out are ways that I've tried to generate the textboxes and haven't worked!
Any help is greatly appreciated
Thanks in advance
Jane
I'm hoping that somebody can help me with this, I tried in the VB.net forum yesterday and it was suggested I try here!
What I would like to do is dynamically generate textboxes. These textboxes are generated depending on the selected value in a radiobutton list within a webform, for example, if the selected value in the radiobutton list is '4' then 4 textboxes are generated.
I have some coding done, but I'm not too sure 1) if it is correct and 2) how do I get the textboxes to show on the form? The radiobutton list is set so that AUTOPOSTBACK = TRUE as I need the textbox values after the user clicks the SUBMIT button.
Here is my coding so far for the textboxes:
Public Sub LettersFound(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim i As Integer
Dim LettersFound As TextBox
For i = 1 To "No_Letters"
'LettersFound.Visible.ToString()
'LetFoundTable(LettersFound.Text)
i = i + 1
'Response.Write("This is the number of text boxes that should be shown" + "' & i & '")
Next
End Sub
Where "No_Letters" is the name of the radiobutton list. The maximum number of textboxes to be drawn is 12 if that helps?
The bits that are commented out are ways that I've tried to generate the textboxes and haven't worked!
Any help is greatly appreciated
Thanks in advance
Jane