Here is my WebUserControl.ascx.vb:
Partial Class WebUserControl
Inherits System.Web.UI.UserControl
Private itemno As Char
Public Property itemNumber() As Char
Get
Return itemno
End Get
Set(ByVal value As Char)
itemno = value
End Set
End Property
End Class
And here is How I try to access UserControl property:
Partial Class testPage
Inherits System.Web.UI.Page
Protected Sub Button1_clickEvent(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myUserControl As New UserControl
myUserControl = LoadControl("WebUserControl.ascx")
PlaceHolder1.Controls.Add(myUserControl)
PlaceHolder1.Controls.Add(New LiteralControl("test"))
myUserControl.ItemNumber='125-12'
...
Go to the complete details ...