473,385 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dirty property value persist problem

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(DesignerSerializat ionVisibility.Content)]
[TypeConverter((Type)typeof(SQLSettingsTypeConverte r))]
[PersistenceModeAttribute(PersistenceMode.InnerProp erty)]
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.

Aug 24 '06 #1
0 1217

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
6
by: P | last post by:
Hi, I have a form with several controls. One of them is initialized through VB in frm_current. I am using the frm_beforeupdate event to prompt users for saving changes. How can I make it so that...
2
by: Salad | last post by:
A97. I have a command button to save and exit. I had the code If Me.Dirty Then Docmd.RunCommand acCmdSaveRecord ...more code endif I was getting an error because a value was not getting...
9
by: Susan Bricker | last post by:
I am currently using the OnDirty event of a Form to detect whether any fields have been modified. I set a boolean variable. Then, if the Close button is clicked before the Save button, I can put...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
10
by: Michael Maes | last post by:
Hi, I have a BaseClass from which many Classes Derive. In short: the BaseClass provides the functionalities (Methods) and the Derived Classes extend it with Properties. One of the (Base)...
5
by: Dan Iregren | last post by:
Hi, I need to know when a property has ben modified (IsDirty). The most obvious way to solve the problem is perhaps something like the following; Private m_sFirstName As String Private...
0
by: Umut Tezduyar | last post by:
I have build a sample control but the designer doesn't communicate it to parse the childen. Please if you are an control developer, spend your 10 minutes to solve my problem. The main problem...
0
by: Jeremy Chapman | last post by:
I have included below virtually all the code to a control I'm trying to build. My issue is that an array list property in my control does not get persisted properly to the aspx page code in design...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.