Live Chat Icon For mobile
Live Chat Icon

Why doesn’t my properties tagged with the PersistenceMode.InnerProperty attribute get saved in the aspx file?

Platform: ASP.NET| Category: Serialization

All string type properties get saved as attributes of the parent tag inspite of the InnerProperty attribute setting. In fact, setting the InnerProperty attribute might prevent the property from getting saved at all.

For example, in the property declaration below:


[C#]
[
Category('Appearance'),
NotifyParentProperty(true),
PersistenceMode(PersistenceMode.Attribute), // This should always be Attribute, not anything else like InnerProperty.
]
public string Text{get{return text;}set{text = value;}}

Share with