Click here to Skip to main content
15,922,574 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to change the colour of buttons through timer in c# window application Pin
DaveyM6911-Feb-11 23:04
professionalDaveyM6911-Feb-11 23:04 
GeneralRe: how to change the colour of buttons through timer in c# window application Pin
aeman12-Feb-11 0:08
aeman12-Feb-11 0:08 
GeneralRe: how to change the colour of buttons through timer in c# window application Pin
DaveyM6912-Feb-11 0:20
professionalDaveyM6912-Feb-11 0:20 
GeneralRe: how to change the colour of buttons through timer in c# window application Pin
aeman12-Feb-11 1:02
aeman12-Feb-11 1:02 
GeneralRe: how to change the colour of buttons through timer in c# window application Pin
aeman12-Feb-11 0:06
aeman12-Feb-11 0:06 
Questionhow to insert values in text box at run time in c# and assign it to int Pin
aeman11-Feb-11 19:16
aeman11-Feb-11 19:16 
AnswerRe: how to insert values in text box at run time in c# and assign it to int Pin
OriginalGriff11-Feb-11 20:23
mveOriginalGriff11-Feb-11 20:23 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
aeman11-Feb-11 21:08
aeman11-Feb-11 21:08 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
Anubhava Dimri11-Feb-11 21:19
Anubhava Dimri11-Feb-11 21:19 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
aeman11-Feb-11 21:36
aeman11-Feb-11 21:36 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
Anubhava Dimri11-Feb-11 21:44
Anubhava Dimri11-Feb-11 21:44 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
OriginalGriff11-Feb-11 21:26
mveOriginalGriff11-Feb-11 21:26 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
aeman11-Feb-11 21:33
aeman11-Feb-11 21:33 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
OriginalGriff11-Feb-11 21:45
mveOriginalGriff11-Feb-11 21:45 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
DaveyM6911-Feb-11 22:15
professionalDaveyM6911-Feb-11 22:15 
GeneralRe: how to insert values in text box at run time in c# and assign it to int Pin
aeman11-Feb-11 22:39
aeman11-Feb-11 22:39 
QuestionHow to Detect Music Device Pin
Pranit Kothari11-Feb-11 19:14
Pranit Kothari11-Feb-11 19:14 
QuestionSend Mail From Localhost Pin
Anubhava Dimri11-Feb-11 18:58
Anubhava Dimri11-Feb-11 18:58 
AnswerRe: Send Mail From Localhost Pin
Richard MacCutchan11-Feb-11 21:12
mveRichard MacCutchan11-Feb-11 21:12 
GeneralRe: Send Mail From Localhost Pin
Anubhava Dimri11-Feb-11 21:16
Anubhava Dimri11-Feb-11 21:16 
GeneralRe: Send Mail From Localhost Pin
Richard MacCutchan11-Feb-11 21:20
mveRichard MacCutchan11-Feb-11 21:20 
GeneralRe: Send Mail From Localhost Pin
Anubhava Dimri11-Feb-11 21:27
Anubhava Dimri11-Feb-11 21:27 
GeneralRe: Send Mail From Localhost Pin
phil.o11-Feb-11 22:39
professionalphil.o11-Feb-11 22:39 
GeneralRe: Send Mail From Localhost Pin
Anubhava Dimri11-Feb-11 22:44
Anubhava Dimri11-Feb-11 22:44 
QuestionC# ConnectionString Update - Read Only? Pin
gmhanna11-Feb-11 16:42
gmhanna11-Feb-11 16:42 
Hi,

I fetch my connection string like this:

connectionString = Properties.Settings.Default.KTReunionConnectionString;


Which works perfectly. However I want to give the user the ability to name the database and update the string. Any attempt using the method below gives a compiler message that it's read only. How do I get around this?

Properties.Settings.Default.KTReunionConnectionString = connectionString;


I've tried this, however it doesn't not update in the app.config file:
var mySettings = ConfigurationManager.ConnectionStrings[0];
var cf = typeof(ConfigurationElement).GetField("_bReadOnly", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
cf.SetValue(mySettings, false);
mySettings.ConnectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=" + databaseName + "Integrated Security=True";


Is it possible to update the connection string?

Thank you,
Glenn

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.