Web Configue

J

Jim Heavey

I'm working on a WINDOWS application.
I created a configuration file with the name of "MyProjectName.exe.config".
I loaded the following configuration information into the file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectStr"
value="MyConnectionString />
<add key="DataBase"
value="VideoStore"/>
<add key="DbOwner"
value="jheavey"/>

</appSettings>
</configuration>

I attempted to access the configuration file in the same manner as I would
in a "VB" Application, but it did not like the format, so I added the
"get" method, but nothing comes back, what am I doing wrong?

Here is my code...

private string connString =
System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectStr");

Thanks in advance for your assistance!!!!!!!!
 
G

Guillermo 'guille'

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top