Click here to Skip to main content
15,905,781 members
Home / Discussions / C#
   

C#

 
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

AnswerRe: C# ConnectionString Update - Read Only? Pin
Dave Kreskowiak11-Feb-11 18:36
mveDave Kreskowiak11-Feb-11 18:36 
AnswerRe: C# ConnectionString Update - Read Only? Pin
PIEBALDconsult12-Feb-11 3:54
mvePIEBALDconsult12-Feb-11 3:54 
QuestionHow to get printer true status? Pin
NTSteven11-Feb-11 14:19
NTSteven11-Feb-11 14:19 
AnswerRe: How to get printer true status? Pin
Dave Kreskowiak12-Feb-11 3:58
mveDave Kreskowiak12-Feb-11 3:58 
QuestionReset Network adapter Statics Pin
I Believe In GOD11-Feb-11 8:06
I Believe In GOD11-Feb-11 8:06 
AnswerRe: Reset Network adapter Statics Pin
OriginalGriff11-Feb-11 8:57
mveOriginalGriff11-Feb-11 8:57 
GeneralRe: Reset Network adapter Statics Pin
I Believe In GOD11-Feb-11 9:33
I Believe In GOD11-Feb-11 9:33 
AnswerRe: Reset Network adapter Statics [modified] Pin
Dan Mos11-Feb-11 9:00
Dan Mos11-Feb-11 9:00 
GeneralRe: Reset Network adapter Statics Pin
I Believe In GOD11-Feb-11 9:37
I Believe In GOD11-Feb-11 9:37 
QuestionCultureInfo and DateTime.parse Pin
Paul E Davies11-Feb-11 3:59
Paul E Davies11-Feb-11 3:59 
AnswerRe: CultureInfo and DateTime.parse Pin
OriginalGriff11-Feb-11 4:48
mveOriginalGriff11-Feb-11 4:48 
GeneralRe: CultureInfo and DateTime.parse Pin
Paul E Davies13-Feb-11 22:24
Paul E Davies13-Feb-11 22:24 
GeneralRe: CultureInfo and DateTime.parse Pin
OriginalGriff13-Feb-11 22:41
mveOriginalGriff13-Feb-11 22:41 
GeneralRe: CultureInfo and DateTime.parse Pin
Paul E Davies13-Feb-11 23:24
Paul E Davies13-Feb-11 23:24 
GeneralRe: CultureInfo and DateTime.parse Pin
OriginalGriff14-Feb-11 1:36
mveOriginalGriff14-Feb-11 1:36 
GeneralRe: CultureInfo and DateTime.parse Pin
Paul E Davies14-Feb-11 4:26
Paul E Davies14-Feb-11 4:26 
GeneralRe: CultureInfo and DateTime.parse Pin
OriginalGriff14-Feb-11 9:04
mveOriginalGriff14-Feb-11 9:04 

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.