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.selec teditem.findcon trol..
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.Selec tedItem.FindCon trol("Image1")
Session("a") = a.ImageUrl
b = DataList1.Selec tedItem.FindCon trol("descripti onLabel")
Session("b") = b.Text
c = DataList1.Selec tedItem.FindCon trol("priceLabe l")
Session("c") = c.Text
d = DataList1.Selec tedItem.FindCon trol("quantityL abel")
Session("d") = d.Text
f = DataList1.Selec tedItem.FindCon trol("orderLabe l")
Session("f") = f.Text
Session("member ID") = "bx"
cmd = "Insert into ShoppingCart (imagePath,desc ription,price,q uantity,order_s tatus,Username) values ('" & Session("a") & "','" & Session("b") & "','" & Session("c") & "','" & Session("d") & "','" & Session("f") & "','" & Session("member ID") & "')"
whenever i tried to insert item in the datalist to my shopping cart.
Can anyone help? I think the error is at datalist1.selec teditem.findcon trol..
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.Selec tedItem.FindCon trol("Image1")
Session("a") = a.ImageUrl
b = DataList1.Selec tedItem.FindCon trol("descripti onLabel")
Session("b") = b.Text
c = DataList1.Selec tedItem.FindCon trol("priceLabe l")
Session("c") = c.Text
d = DataList1.Selec tedItem.FindCon trol("quantityL abel")
Session("d") = d.Text
f = DataList1.Selec tedItem.FindCon trol("orderLabe l")
Session("f") = f.Text
Session("member ID") = "bx"
cmd = "Insert into ShoppingCart (imagePath,desc ription,price,q uantity,order_s tatus,Username) values ('" & Session("a") & "','" & Session("b") & "','" & Session("c") & "','" & Session("d") & "','" & Session("f") & "','" & Session("member ID") & "')"
Comment