Hi, there will be an error-Object reference not set to an instance of an object.
whenever i tried to insert item in the datalist to my shopping cart.
Can anyone help? I think the error is at datalist1.selecteditem.findcontrol..
This is part of the code copied:
Dim a As Image
Dim b As Label
Dim c As Label
Dim d As Label
Dim f As Label
a = DataList1.SelectedItem.FindControl("Image1")
Session("a") = a.ImageUrl
b = DataList1.SelectedItem.FindControl("descriptionLab el")
Session("b") = b.Text
c = DataList1.SelectedItem.FindControl("priceLabel")
Session("c") = c.Text
d = DataList1.SelectedItem.FindControl("quantityLabel" )
Session("d") = d.Text
f = DataList1.SelectedItem.FindControl("orderLabel")
Session("f") = f.Text
Session("memberID") = "bx"
cmd = "Insert into ShoppingCart (imagePath,description,price,quantity,order_status ,Username) values ('" & Session("a") & "','" & Session("b") & "','" & Session("c") & "','" & Session("d") & "','" & Session("f") & "','" & Session("memberID") & "')"