Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7034953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:14:50+00:00 2026-05-28T01:14:50+00:00

I started programming in c# for a few days ago, so I am a

  • 0

I started programming in c# for a few days ago, so I am a total newbeginner at this. Based on my experience in other languages, I found it somewhat “simple”.

I am building a system where users are logging in to my application, which is working. I want to have a “remember me”-setting where the information is stored locally. What is the best way to do this? I’ll only save the username and the password-hash.

Edit: This is a desktop-application. The login-information is sent to a php-script simply using HttpWebRequest

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:14:50+00:00Added an answer on May 28, 2026 at 1:14 am

    You can use the ConfigurationManager Class to manage your application’s settings.

    you can use this function to add new Keys to your configuration file:

    public bool setSetting(string pstrKey, string pstrValue)
    {
        Configuration objConfigFile =
            ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
        bool blnKeyExists = false;
    
        foreach (string strKey in objConfigFile.AppSettings.Settings.AllKeys)
        {
            if (strKey == pstrKey)
            {
                blnKeyExists = true;
                objConfigFile.AppSettings.Settings[pstrKey].Value = pstrValue;
                break;
            }
        }
        if (!blnKeyExists)
        {
            objConfigFile.AppSettings.Settings.Add(pstrKey, pstrValue);
        }
        objConfigFile.Save(ConfigurationSaveMode.Modified);
        ConfigurationManager.RefreshSection("appSettings");
        return true;
    }
    

    and then save up your username (for example)

    setSetting("username", usernameTextBox.Text);
    

    Once your application starts up, you can read the information you saved earlier from your ConfigurationManager

    usernameTextBox.Text = ConfigurationManager.AppSettings["username"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ordered Programming Windows Fifth Edition a few days ago, and started working with
I started programming in Lua few days ago. I have become familiar with the
I started multithread programming in C# (WPF) few days ago and here is a
A few days ago I started programming with C after programming with C++, however,
I've been programming in C,C++,C# and a few other languages for many years, mainly
I have started programming few years ago. and generally i use for programming C
I'm pretty new with Android programming, started a few weeks ago. Stackoverflow it's my
I started learning scala a few days ago and when learning it, I am
I've just started learning how to program a few months ago and this is
I started programming in perl few months back and this is my first question

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.