By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,161 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,161 IT Pros & Developers. It's quick & easy.

AppSettingsReader Question (1.1)

P: n/a
I have googled several articles on how to get an AppSettings out of the
web.config and into a string in C# and none of them work.

The following code gets an error on the = sign in myString =

I have tried every option on the second parameter trying to specify string.
What's wrong with the last statement? What statement would work?



AppSettingsReader myReader = new System.Configuration.AppSettingsReader();

SqlConnection connCP = new SqlConnection();

string myString = null;

myString = myReader.GetValue("connCP.ConnectionString",
May 11 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.