Application setting not being saved...

  • Thread starter Thread starter Ray Mitchell
  • Start date Start date
R

Ray Mitchell

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
 
Ray Mitchell said:
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top