PC Review


Reply
Thread Tools Rate Thread

Dirty property value persist problem

 
 
yp.yean@gmail.com
Guest
Posts: n/a
 
      24th Aug 2006
Hi,

I created a custom control, and encountered a dirty property value
persistence problem.
I created a property with a custom class type, call SQLSettings which
holds the SQL connection parameters, the class as follows:

public sealed class SQLSettings
{
private string serverName;
.......

public SQLSettings()
{
this.serverName = string.Empty;
......
}

[NotifyParentProperty(true)]
public string ServerName
{
get
{
return this.serverName;
}
set
{
this.serverName = value;
}
}
...................

And, I also created an mapping TypeConverter and UITypeEditor classes
to handle the design-time founctinality. The property I created in my
conbtrol as follows:

[BrowsableAttribute(true)]
[CategoryAttribute("Behavior")]
[BindableAttribute(true)]
[NotifyParentProperty(true)]
[EditorAttribute(typeof(SQLSettingsUITypeEditor),
typeof(UITypeEditor))]

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[TypeConverter((Type)typeof(SQLSettingsTypeConverter))]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public SQLSettings SQLSettingsData
{
get
{
return this._sqlSettings;
}
set
{
this._sqlSettings = value;
}
}

They all works fine when first set value to this property, I can see
the persisted data showed in .aspx file. When I go back to design view
and update the property value via my UITypeEditor, I can see the value
already updated in VS.NET properties browser. But when I turn to see
..aspx file in code view, I didn't see the dirty property value updated
in .aspx file. When I turn to design view, the updated property value
is lost, it remain keep the first persisted value.

How about to solve this problem? Any idea?
Thank you for your kindly help.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Persist property Grahams Microsoft Outlook Program Addins 0 13th Apr 2010 08:01 PM
Sandbox problem with Dirty property in a control Brian Hancock Microsoft Access Form Coding 0 18th Apr 2007 09:16 AM
Sandbox problem with Dirty property in a control Brian Hancock Microsoft Access VBA Modules 0 18th Apr 2007 08:37 AM
Dirty property value persist problem in asp.net custom control yp.yean@gmail.com Microsoft Dot NET Framework 0 24th Aug 2006 05:16 AM
Does Unbound Form's Dirty Property Property Work? Mike Thomas Microsoft Access Form Coding 3 6th Sep 2005 05:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:28 PM.