I have a little program look like this.
<Please have a look
It will calculate the total area by adding up all wall area.
Public Sub btnWallAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWallAdd.Click FlowLayoutPanel1.Controls.Clear() FlowLayoutPanel1.AutoScroll = True For i As Integer = 1 To Val(txtWallNo.Text) Dim Width As New TextBox() Dim Height As New TextBox() Width.Name = "Width" & i Width.Text = Width.Name Height.Name = "Height" & i Height.Text = Height.Name FlowLayoutPanel1.Controls.Add(Width) FlowLayoutPanel1.Controls.Add(Height) Next End Sub
I have successfully create dynamic textbox base on the number entered by user but I don't know how to get values from those textbox an add them up. Please teach me how do it. Thank you very much!
Sorry for my English!