server control serialization problem with UiTypeEditor


C

crazyhorse

Have a expandable property that is passed to a uitypeeditor which the
property does not get serialized. Value from uitypeeditor updates in
the designer window but not in run mode. Have tried both
DesignerSerializationVisibility.Content and
DesignerSerializationVisibility.Visible with no success. Could it be
something in my Uitypeeditor or menudata class that can cause the
serialization class. Can post more code if needed. Please give me
some tips of what to look for.

//property
[
Editor(typeof(TextEditor),typeof(UITypeEditor))
]
[DefaultValue("Enter"), Category("Data"),
PersistenceMode(PersistenceMode.InnerProperty),
NotifyParentProperty(true),RefreshProperties(RefreshProperties.All),DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
public menudata MenuData3
{
get{return _mdata;}
set{_mdata = value;}
}


private menudata _mdata = new menudata();



----------------------------------------------------------------
menudata.cs
----------------------------------------------------------------
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Xml;
using System.Text;
using System.ComponentModel.Design;

namespace MenuLib
{
[Serializable]
[TypeConverter(typeof(_menudataoverride))]
public class menudata: ExpandableObjectConverter
{
public menudata()
{
_menuxml="TEST";
}

string _menuxml;


// Created by VS.NET
[Bindable(false),
NotifyParentProperty(true),
RefreshProperties(RefreshProperties.Repaint)
]
public string menuxml
{
get { return _menuxml; }
set{ _menuxml = value; }
}

}
}
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top