473,480 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Application setting not being saved...

Hello,

I've done this type of thing many times before so I know it works, but for
some reason it's not working in this particular application.

In an event handler I save some values into the application settings, such as:

Settings.Default.host = some value;
Settings.Default.port = some value;
Settings.Default.userName = some value;
Settings.Default.password = some value;
Settings.Default.remoteDirectory = some value;

As long as I don't close the application I can recall the values I stored in
the settings by doing something like:

something = Settings.Default.host;
something = Settings.Default.port;
something = Settings.Default.userName;
something = Settings.Default.password;
something = Settings.Default.remoteDirectory;

However, once I close the application and restart it, all the values in
Settings.Default are lost.

Any ideas?

Thanks,
Ray
Sep 6 '08 #1
1 1800


"Ray Mitchell" wrote:
Hello,

I've done this type of thing many times before so I know it works, but for
some reason it's not working in this particular application.

In an event handler I save some values into the application settings, such as:

Settings.Default.host = some value;
Settings.Default.port = some value;
Settings.Default.userName = some value;
Settings.Default.password = some value;
Settings.Default.remoteDirectory = some value;

As long as I don't close the application I can recall the values I stored in
the settings by doing something like:

something = Settings.Default.host;
something = Settings.Default.port;
something = Settings.Default.userName;
something = Settings.Default.password;
something = Settings.Default.remoteDirectory;

However, once I close the application and restart it, all the values in
Settings.Default are lost.

Any ideas?

Thanks,
Ray

It's late and I'm careless. Obviously I left out Settings.Default.Save();
Sorry!
Sep 6 '08 #2

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

Similar topics

8
9682
by: David McDivitt | last post by:
I need to set tabs on java generated pages. Pages have four sections: header, sidebar, body, and footer. The sidebar and body change dynamically. The tab key must go to anchors, fields, and buttons...
23
4231
by: Gustaf | last post by:
I just read this article from today: http://webstandards.org/buzz/archive/2005_09.html I need some help understanding this sentense: The W3C recommends XHTML 1.1 should be served with the...
3
2428
by: wolftor | last post by:
If I change the application title, it appears to change OK during the current session; but if I exit Access 97 and then run the application again, the change did not get saved. Any idea how to fix...
3
3040
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about...
4
12810
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
0
1010
by: Kent Liu | last post by:
In the VB6, we could using SaveSetting/GetSetting to store the information and get them for personalization of windows applications. But all these need the programmer to write code to save & get &...
9
2547
by: Dave Booker | last post by:
When I run a particular application I've been working on for a while, it somehow finds a value for the Application Setting "Test.Properties.Settings.Default.ProjectPath", but I can't see where it...
1
2947
by: modi321 | last post by:
Everyone, I have a question on how to use persistant application settings with 2.0. I understand I can use defined types like ints, strings, and so on, but how about my own custom class? The...
3
3160
by: Jon Slaughter | last post by:
I wrote an app that needed to save settings such as colors, fonts, etc... after hours of trying to use ConfigurationManager and AppSettings along with a few other things I finally found that I...
11
10079
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have worked with application settings in VS2005 and C# for awhile, but usually with standard types. I have been trying to store a custom container/class/type in an application setting and I have...
0
7048
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
6911
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
7050
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,...
1
6743
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
5344
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,...
0
4488
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...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.