I have a usercontrol attached to an aspx page (vb.net). The user control has a Public function set up as so:
Public Sub pdqmAddItem(ByVal intProdID As Int32)
lblTotal.Text = "add item " & intProdID
End Sub
In the code behind on the page which has the User Control on it, I want to be able to call the Functiob/Sub above to perform some actions. To do that I have added the following to the top of page:
Protected WithEvents ucPdqmBasketMini As pdqmBasketMini
Which defines the attached user control, then later on in the page an event which handles the onClick of a datalist to fire off:
ucPdqmBasketMini.pdqmAddItem(intProdID)
But, I get the error of:
Object reference not set to an instance of an object.
On the call of ucPdqmBasketMini.pdqmAddItem(intProdID).
How do I expose that procedure in the User Control to accept some data being passed thorugh it from another page??? Do I need to do a get/let on the procedure some how???
Confused and getting frustrated
Public Sub pdqmAddItem(ByVal intProdID As Int32)
lblTotal.Text = "add item " & intProdID
End Sub
In the code behind on the page which has the User Control on it, I want to be able to call the Functiob/Sub above to perform some actions. To do that I have added the following to the top of page:
Protected WithEvents ucPdqmBasketMini As pdqmBasketMini
Which defines the attached user control, then later on in the page an event which handles the onClick of a datalist to fire off:
ucPdqmBasketMini.pdqmAddItem(intProdID)
But, I get the error of:
Object reference not set to an instance of an object.
On the call of ucPdqmBasketMini.pdqmAddItem(intProdID).
How do I expose that procedure in the User Control to accept some data being passed thorugh it from another page??? Do I need to do a get/let on the procedure some how???
Confused and getting frustrated