Code For creating Dynamic textboxes:
Protected Sub ddl_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
If ((Not (ddl.SelectedValue) Is Nothing) _
AndAlso (Integer.Parse(ViewState("count").ToString) <> 0)) Then
Dim i As Integer = 1
Do While (i <= Integer.Parse(ddl.SelectedValue))
Dim t As TextBox = New TextBox
t.ID = ("TextBox_" + i)
form1.Controls.Add(t)
i = (i + 1)
Loop
ElseIf ((Not (ddl.SelectedValue) Is Nothing) _
AndAlso (Integer.Parse(ViewState("count").ToString) > 0)) Then
Dim id As Integer = Integer.Parse(ViewState("count").ToString)
Dim i As Integer = 1
Do While (i <= Integer.Parse(ddl.SelectedValue))
Dim t As TextBox = New TextBox
t.ID = ("TextBox_" + id)
form1.Controls.Add(t)
id = (id + 1)
i = (i + 1)
Loop
End If
End Sub
and in page load add this
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not IsPostBack Then
ViewState("count") = 0
End If
End Sub
To validate the data, add a button control to your page ( I will add the code shortly )