M
Mike Hofer
I have a webcontrol that has the following property defined:
<Category("Behavior"), PersistenceMode(PersistenceMode.Attribute), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
Public Property ForceDeterminateState() As Boolean
Get
Return CBool(Me.ViewState("ForceDeterminateState"))
End Get
Set(ByVal value As Boolean)
Me.ViewState("ForceDeterminateState") = Value
End Set
End Property
Now, I have lots of other properties like this on my control, and they all serialize just fine to the ASPX file and to the viewstate. This one, however, loses its value whenever I build the project.
Neither the PersistenceModeAttribute nor the DesignerSerializationVisibilityAttribute seems to have any effect whatsoever.
What am I doing wrong?
Thanks in advance,
Mike
<Category("Behavior"), PersistenceMode(PersistenceMode.Attribute), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
Public Property ForceDeterminateState() As Boolean
Get
Return CBool(Me.ViewState("ForceDeterminateState"))
End Get
Set(ByVal value As Boolean)
Me.ViewState("ForceDeterminateState") = Value
End Set
End Property
Now, I have lots of other properties like this on my control, and they all serialize just fine to the ASPX file and to the viewstate. This one, however, loses its value whenever I build the project.
Neither the PersistenceModeAttribute nor the DesignerSerializationVisibilityAttribute seems to have any effect whatsoever.
What am I doing wrong?
Thanks in advance,
Mike