static void SetConfig(string userName,string userPwd,string isRemembered) { Configuration cfg=ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); cfg.AppSettings["UserName"].Value=userName; //string encryptedPwd=CipherHelper.Encrypt3DES(userPwd); cfg.AppSettings.Settings["UserPwd"].Value=encryptedPwd; cfg.AppSettings.Settings["IsRemebered"].Value="True"; cfg.Save(ConfigurationSaveMode.Modified,true); ConfigurationManager.RefreshSection("appSettings"); }