FastPlymouth
Newcomer
- Joined
- Jan 26, 2006
- Messages
- 8
Hello All,
I am getting the standard "Object variable or With block variable not set" error on the following code. I have a repeater with some textboxes that I'm trying to collect the input from in an event handler triggered by a button outside the repeater control.
Am I missing a step somewhere?
Any ideas?
Thanks!
I am getting the standard "Object variable or With block variable not set" error on the following code. I have a repeater with some textboxes that I'm trying to collect the input from in an event handler triggered by a button outside the repeater control.
Am I missing a step somewhere?
Code:
Protected Sub addCart_Click(ByVal sender As Object, ByVal e As EventArgs)
' If add to cart button is pressed, check all qty boxes for quantities
objCartDT = Session("Ordering_Cart")
Dim i As Integer = 0
For i = 0 To itemRepeater.Items.Count - 1
Dim dataItem As RepeaterItem = itemRepeater.Items(i)
' Validate non-empty qty boxes
If IsNumeric(CType(dataItem.FindControl("qty"), TextBox).Text) Then
Dim itemQty As Integer = CInt(Regex.Replace(CType(dataItem.FindControl("qty"), TextBox).Text, "'", ""))
***SNIP***
End If
Next
End Sub
Thanks!