Protected Sub GenTextBox()
Dim lblBr As Label
Dim Input As Integer = CInt(txt_Amount.Text)
For Count = 1 To Input
Dim lbl_List As New Label
lbl_List.Text = "ลำดับที่ " & Count.ToString & " "
Dim lbl_DateApprove As New Label
lbl_DateApprove.Text = "ว/ด/ป.อนุมัติ : " & "*" & " "
Dim txt_DateApprove As New TextBox
Dim lbl_DateStartWork As New Label
lbl_DateStartWork.Text = "ว/ด/ป.เริ่มงาน : " & "*" & " "
Dim txt_DateStartWork As New TextBox
lblBr = New Label
lblBr.Text = "<br>"
Me.pnlCtrl.Controls.Add(lbl_List)
Me.pnlCtrl.Controls.Add(lbl_DateApprove)
Me.pnlCtrl.Controls.Add(txt_DateApprove)
Me.pnlCtrl.Controls.Add(lbl_DateStartWork)
Me.pnlCtrl.Controls.Add(txt_DateStartWork)
Me.pnlCtrl.Controls.Add(lblBr)
Next
End Sub