Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help reading an application Config File
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Help reading an application Config File
Miscellaneous
Thread ID:
00889292
Message ID:
00889292
Views:
47
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.
Next
Reply
Map
View

Click here to load this message in the networking platform