Persist properties for repeated use in designer?
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolscs' list.


Karl Kemp
Hello,=20

I would like to be able to persist the "state" of the properties of my =
server control so that a user can do something like this:

1. User drags my control on to one of their ASP.NET pages
2. User configures the control by setting properties
3. Save the values of these properties (hopefully automatically) so =
that when...
4. User drags the control onto a seperate ASP.NET page, the property =
values will be preloaded with the values they entered for the first one.

I haven't gotten this far with my control, I'm mostly asking to see if =
what I want to do is even feasible before I continue.

A ossibility I've thought of is writing a resx file with the values, =
and reading it in when the control loads, or having the user load it via =
a property item. I don't know if this is possible from within the =
control designer though.

Whatever methos I use, I'd like it such that the persisted values are =
available between sessions in VS.NET. (e.g. stored on the file system)

Thank you for any help you could offer. I am new at this mailing list, =
so if I have mis-directed this question, please forgive me and point me =
in the right direction.

Karl Kemp=20
kkemp@[remove-me]shelflink.com

Reply to this message...
 
    
Michael
I too have desired such functionality in a control that I have been
developing. The solution I came up with which is not exactly what you're
after (but suited my needs) was to create a schema for an XML file
containing properties from my control. The main disadvantage to this was
that I actually moved the properties to the file and removed them from the
properties tab, losing the rich functionality of the VS.NET designer.

An alternative might be to add designer verbs to save and load the
properties from an XML file. Unfortunately I do not have code for this, but
it should be possible to implement.

I'd be keen to hear if anyone else has developed code for this or if they
have a better suggestion.

-----Original Message-----
From: Karl Kemp [mailto:Click here to reveal e-mail address]
Sent: Wednesday, 5 June 2002 2:11 AM
To: aspngcontrolscs
Subject: [aspngcontrolscs] Persist properties for repeated use in
designer?

Hello,

I would like to be able to persist the "state" of the properties of my
server control so that a user can do something like this:

1. User drags my control on to one of their ASP.NET pages
2. User configures the control by setting properties
3. Save the values of these properties (hopefully automatically) so that
when...
4. User drags the control onto a seperate ASP.NET page, the property values
will be preloaded with the values they entered for the first one.

I haven't gotten this far with my control, I'm mostly asking to see if what
I want to do is even feasible before I continue.

A ossibility I've thought of is writing a resx file with the values, and
reading it in when the control loads, or having the user load it via a
property item. I don't know if this is possible from within the control
designer though.

Whatever methos I use, I'd like it such that the persisted values are
available between sessions in VS.NET. (e.g. stored on the file system)

Thank you for any help you could offer. I am new at this mailing list, so
if I have mis-directed this question, please forgive me and point me in the
right direction.

Karl Kemp
kkemp@[remove-me]shelflink.com

| [aspngcontrolscs] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngcontrolscs.asp = JOIN/QUIT
| http://www.asplists.com/search = SEARCH Archives
Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com