J
Jay
Guys, I'm stuck!!!
I have two usercontrosl, in UC2 I had a public sub which I want to call
from UC1. Both UC's are on the same aspx page.
In UC1 I have teh following line at the top of the ascx:
Protected WithEvents ucPdqmBasketMini As pdqmBasketMini
IN UC2 the sub looks like:
Public Sub pdqmAddItem(ByVal intProdID As Int32)
lblTotal.Text = "add item " & intProdID
End Sub
The lblTotal label is member of the .aspx/vb page.
When I call the Sub from UC1 with the following:
ucPdqmBasketMini.pdqmAddItem(intProdID)
I get the error:
Object reference not set to an instance of an object.
So thinking UC1 cannot see UC2 I added the following declaration in the
ascx of UC1:
<%@ Register TagPrefix="uc1" TagName="pdqmBasketMini"
Src="pdqmBasketMini.ascx" %>
Still no joy. Any ideas what I am doing wrong?
I have two usercontrosl, in UC2 I had a public sub which I want to call
from UC1. Both UC's are on the same aspx page.
In UC1 I have teh following line at the top of the ascx:
Protected WithEvents ucPdqmBasketMini As pdqmBasketMini
IN UC2 the sub looks like:
Public Sub pdqmAddItem(ByVal intProdID As Int32)
lblTotal.Text = "add item " & intProdID
End Sub
The lblTotal label is member of the .aspx/vb page.
When I call the Sub from UC1 with the following:
ucPdqmBasketMini.pdqmAddItem(intProdID)
I get the error:
Object reference not set to an instance of an object.
So thinking UC1 cannot see UC2 I added the following declaration in the
ascx of UC1:
<%@ Register TagPrefix="uc1" TagName="pdqmBasketMini"
Src="pdqmBasketMini.ascx" %>
Still no joy. Any ideas what I am doing wrong?