I'm still a bit stumped on how to load a usercontrol, and then pass a
property value (or variable value) to it.
Here's what I'm using to load the UC:
localCUstomControl.ascx.vb
-------------------------------------
sub initializeExtraControls()
panel_controlHolder.visible = True
customContentControl = CType(Page.LoadControl("../usercontrols/" &
customContent &".ascx"),UserControl)
panel_controlHolder.Controls.Add(customContentCont rol)
End Sub
-------------------------------------
That works just fine, loading the UC. Now, where I get stuck is how do I
pass a property value to that UC?
In the UC I am loading I have this:
usercontrol.ascx.vb
-------------------------------------
public property sampleProperty
-------------------------------------
I've tried just using customContentControl.sampleProperty = "whatever" but
that doesn't work, as sampleProperty is not a mamber of
'system.web.ui.usercontrol'
I've been reading and re-reading this MSDN article:
http://msdn.microsoft.com/library/de...properties.asp
But I'm guessing I'm missing something obvious.
-Darrel