.NETGURU
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...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification