473,805 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving control state to persistent medium [Winforms]

2 New Member
Hi All,

I have a following task to be implemented in my project and I would like to know ideas and best possible solution with little code from you guys. Please let me know and any help would be greatly appreciated.

I have a Windows forms with DYNAMIC controls such as dropdown and textbox controls. I want to save the current state of these controls such as value of textbox and selected item of dropdown to a file. So that when I login back and above stated state will be restored on the same form.

In addition to this, I would like not to hard code control names and their properties. Could we use default property of control while accessing state of that control? This is because there are 3 panels with different controls and I do not know which one be active while saving the state of controls on active panel.

I would like to use reflection and Xml serialization for this.

Please let best possible solutions for this task.

Thanks,
Mahesh
Jun 17 '07 #1
1 1695
kenobewan
4,871 Recognized Expert Specialist
Welcome to TSDN. It appears as though you have a few tasks. This may work better if you break them up, attempt each one and report back on your progress. Thanks.
Jun 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1612
by: benny | last post by:
Hi, I tried the following method to add persistent cookies :- HttpCookieCollection MyCookieCollection = new HttpCookieCollection(); HttpCookie MyCookie = new HttpCookie("LastVisit"); MyCookie.Value = DateTime.Now.ToString(); MyCookieCollection.Add(MyCookie); I found out the above code seem not working if my setting on IE6.0 on
1
1919
by: Mahesh Devjibhai Dhola [MVP] | last post by:
Hi, User can adjust the size of columns of a table or the position of splitter in UI. We want these adjustments to be remembered when we restart the application. Currently, we are saving these adjustments by the user in an XML and saving that XML. We read the XML upon restart and make calls to set the adjustments. This approach becomes difficult as we add more controls and more settings can be made by the user. What other techniques can...
2
1513
by: WJ | last post by:
I am setting the Session State TimeOut to 54 minutes (20 is default) in the Web.Config. I use SQL Server to persist the session states & ID. As long as I am remaining in the web sites, I see all the data persisted from page to page. However, once I quit the browser (MS/IE 6.1) and got backin within 2 seconds, the persisted data no long existed. My impression on the "timeout" paramter is that as long as I come back to my site within the...
5
2724
by: Jon Sagara | last post by:
Say that I have an Excel OWC on my Web page and I want to save any data the user has entered to the server when s/he clicks on the submit button. Is that possible? Thank you, -- Jon Sagara
3
4578
by: RCS | last post by:
I have an app that I have different "sections" that I want to switch back and forth from, all while having the server maintain viewstate for each page. In other words, when I am on Page1.aspx and set textboxes, radio buttons, etc - that viewstate is fine. Then I have a linkbutton that does a Server.Transfer over to Page2.aspx. When I Server.Transfer back to Page1.aspx, the viewstate info is lost. I ran across another example of this last...
5
2348
by: Alan Silver | last post by:
Hello, I have a products page that takes a product ID in the query string. Based on the product details (from a database), the page then loads up one of a number of custom controls, calls a method in the control (that displays product info) and then loads the control into a placeholder so it will be displayed. I want to be able to restore the state of the controls in the custom control, but can't get it to work. For example, the...
1
17960
by: Rich | last post by:
Hello, I am trying to use the Reportviewer control. I have been following an example from the web, and the instructions from the help files on set up a ..rdlc and binding it to the reportviewer control. The help files state that in the form the contains the reportviewer control there is a tasks smart tags panel in design view. I don't see any such thing. Where do I need to look to see this panel? So I have been trying to follow...
0
967
by: Keith | last post by:
I'm working on a form that contains dozens of button controls. When clicked, if the button text has not yet been changed (e.g., .text is blank or = "add item") then it pops up an inputbox and gives the user the option to rename the button. Any button that has already been changed (.text is not blank and <>"add item") will run other code when clicked, adding the button text as part of a new database record. My next step is to make the...
3
1653
by: s9213037 | last post by:
Use case scenario: I have a panel with ID "Upload_Panel", where there is a FileUpload control with ID "FileUpload1" and a button with ID "More_Upload_Files", both of which are added at design time. When users click the "More_Upload_Files" button, a new FileUpload with ID "FileUpload2" control will be added into "Upload_Panel" dynamically.
0
9716
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10609
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9185
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5542
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.