![]() |
|
|
|||||||
![]() |
ASP Net - Persistence problem with custom control property using PersistenceMode.InnerProperty |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
I'm having trouble getting my custom control to save properties that are
decorated with the PersistenceMode.InnerProperty attribute. The properties that are saved with PersistenceMode.Attribute are saved OK. The contents of the ASPX file only contains the attribute, not the inner property: <cc1:MyTestClass id="MyTestClass1" runat="server" S1="a"></cc1:MyTestClass> Here's the code I'm testing with: '------------------------------------------------------------- Imports System.ComponentModel Imports System.Web.UI Imports System.Web.UI.webcontrols <PersistChildren(False), _ Serializable(), _ ParseChildren(True)> _ Public Class MyTestClass Inherits Control Private _s1, _s2 As String Private _style As Style <DesignerSerializationVisibility(DesignerSerializa tionVisibility.Visible), _ NotifyParentProperty(True), _ PersistenceMode(PersistenceMode.Attribute)> _ Public Property S1() As String Get Return _s1 End Get Set(ByVal Value As String) _s1 = Value End Set End Property <DesignerSerializationVisibility(DesignerSerializa tionVisibility.Visible), _ NotifyParentProperty(True), _ PersistenceMode(PersistenceMode.InnerProperty)> _ Public Property S2() As String Get Return _s2 End Get Set(ByVal Value As String) _s2 = Value End Set End Property End Class jahyen |
|
|