473,406 Members | 2,312 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,406 software developers and data experts.

Persisting Form Data

Tom
Hi,

I am looking for an article or tutorial on persisting winform user input for
the life of the app. How to design it? For instance, do I create a
container class specific to each form? This data will need to be accessed
throughout the application and then be persisted to a xml file. Any ideas?

Thanks
Nov 15 '05 #1
3 1352

Hi Tom,

Thanks for posting in this group.
This depends on the design of your application. Normally, all your controls
and elements will run in the main Form class, so you can create a public
field of Form class to store your input. And all the controls can get this
input data through this public field.
If your application is a MDI Form, I think you should also store input data
in Parent form's public field. When creating the child forms, you should
pass the parent form's reference to its child forms, then all the child
forms can manipulate this data.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #2
Tom
Thanks for the post. I understand I could use the forms as the container of
data however this data is used in Business Objects and then will be saved to
file and maybe in the future to a db. So, I rather not directly reference
the form to get the data so I am looking for a better way. Container
classes or typed datasets... and so on. Any ideas?

Thanks

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:Rv**************@cpmsftngxa07.phx.gbl...

Hi Tom,

Thanks for posting in this group.
This depends on the design of your application. Normally, all your controls and elements will run in the main Form class, so you can create a public
field of Form class to store your input. And all the controls can get this input data through this public field.
If your application is a MDI Form, I think you should also store input data in Parent form's public field. When creating the child forms, you should
pass the parent form's reference to its child forms, then all the child
forms can manipulate this data.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3

Hi Tom,

The article below talks about the database and business design of in .Net:
http://www.codeproject.com/cs/database/dal1.asp

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4

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

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
4
by: Dave Veeneman | last post by:
When does serializing objects make more sense than persisting them to a database? I'm new to object serialization, and I'm trying to get a feel for when to use it. Here is an example: I'm...
1
by: lim | last post by:
What is the possible error that occurs when the Page_load event is not triggered during execution. In my page there's some basic server control. Is there any loops holes?
1
by: Diane Yocom | last post by:
I'm still very new to ASP.Net, so wanted to get some advice on how to solve the following design problem (sorry my explanation is so long): I'm developing an ASP.Net intranet app (using VB.Net...
2
by: John Hoge | last post by:
A common problem in database updates in the maintenece of "domain tables". For example, a product database has an option for color. When entering the specifications for a new product, a domain...
2
by: xenophon | last post by:
I added a Hidden Form Field to a form in the code behind. The value is being set in JavaScript client-side, but it is not persisting to the server in the PostBack. I know the value is being set...
5
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
0
ADezii
by: ADezii | last post by:
Most Access Users realize that Recordsets, being virtual representations of a Query, Table, or SQL Statement, exist only in our PC's memory. They, and the data they contain, literally exist at one...
4
by: John | last post by:
Hi I have a form with a couple of text boxes and a list box. The user is able to type text in text boxes and add elements to the list box. My question is; how can I persist the values in these...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.