in asp.net
If I have a web usercontrol WUC with code behind Class CLASSWUC
and I have a web page that loads the control
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
MANAGEGENERAL = LoadControl("WUC.ascx")
MyPlaceholder.Controls.Add(MANAGEGENERAL)
InitializeComponent()
End Sub
And if in CLASSWUC I have a finction that displays a value on the label of
WUC like
Sub DisplayValue(value as String)
Mylabel.text=value
End Sub
QUESTION:
What code shoud I have in my web page to be able to call DisplayValue so as
to display a value in the label.
I current get the message:
Line 1122: Dim stuff As New
PORTAL.ManageGeneralNameSpace.CLASSWUC
Line 1123: stuff.DisplayValue("test")
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Thanks