Dim insertQuantity As StringDim insertEquipment As StringDim intNumber As Integer = 1 Dim newControl As New Control For intNumber = 1 To 1 insertQuantity = "txtQuantity" + CStr(intNumber) insertEquipment = "txtEquipment" + CStr(intNumber) newControl = DirectCast(Me.FindControl(insertQuantity), TextBox) If (Not newControl Is Nothing) Then Response.Write("Cant find control ") Else Response.Write("Found the control") newControl = DirectCast(Me.FindControl(insertQuantity), TextBox) End IfNext intNumberi am trying to retrieve values from multiple text boxes. i Created the textboxes(quantity1, quantity2, etc)
and i am trying to pull these values when a user clicks the button. This is what i have so far.
Please help. When i access newControl.Text it is giving me a null reference to an instance of an object. Thank you.