S
shapper
Hello,
I have a page and two user controls:
Page.aspx
|--- UserControl_1.ascx
|--- UserControl_2.ascx
In UserControl_2 I have a property defined as follows:
' Margin
Private _Margin As Integer
Public Property Margin() As Integer
Get
Return _Margin
End Get
Set(ByVal value As Integer)
_Margin = value
End Set
End Property ' Margin
In UserControl_1 I have the following:
Private Sub MyUserControl2_Init(ByVal sender As Object, ByVal e As
EventArgs) Handles MyUserControl2.Init
MyUserControl2.ID = "MyUserControl2"
MyUserControl2.Margin = 20
End Sub
However, in my UserControl_2 I am only able to access the property
values in Page_Load and not in Page_Init.
Any idea what might be going on?
This is really strange.
Thanks,
Miguel
I have a page and two user controls:
Page.aspx
|--- UserControl_1.ascx
|--- UserControl_2.ascx
In UserControl_2 I have a property defined as follows:
' Margin
Private _Margin As Integer
Public Property Margin() As Integer
Get
Return _Margin
End Get
Set(ByVal value As Integer)
_Margin = value
End Set
End Property ' Margin
In UserControl_1 I have the following:
Private Sub MyUserControl2_Init(ByVal sender As Object, ByVal e As
EventArgs) Handles MyUserControl2.Init
MyUserControl2.ID = "MyUserControl2"
MyUserControl2.Margin = 20
End Sub
However, in my UserControl_2 I am only able to access the property
values in Page_Load and not in Page_Init.
Any idea what might be going on?
This is really strange.
Thanks,
Miguel