Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help reading an application Config File
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Help reading an application Config File
Divers
Thread ID:
00889292
Message ID:
00889292
Vues:
49
I have a simple winForm with a button and text box. I'm trying to figure out how to read a file setting from an application config file. The config file is named the same as the exe (didn't work at all before that), and I have the following code in my button:
        Dim sOutput As String = " "
        sOutput = ConfigurationSettings.AppSettings("ConnectionString")
        Me.TextBox1.Text = sOutput
In the debugger, sOutput is = to nothing

My .config file has the following:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<AppSettings>
	<add key="ConnectionString" value "ConnectionStringText" />
	</AppSettings>
</configuration>
It runs without any errors, but I don't get the connection string text.

Thanks for any help.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform