0

hii all!
When i tried to access a value from the configuration file (ConfigurationManager.AppSettings("ADMIN"))
i am getting an error:
'ConfigurationManager.AppSettings' is not declared or the module containing it is not loaded in the debugging session.

can you please anyone help me who have experienced the
above said error?

thanks in advance,

best regards,

Ammar.

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by afroz375
0

first of all u have to declare in the webconfig file.About the key (being used),and that key can be accessed in code-behind file using--->dim con as string=configurationsettings.appsettings("manager")
...........

0

Hi Ammar,

First add this code to your app.config

<AppSettings>
 <add key="Conn"  value="uid=zz; pwd=****; database=XX; server=11.111.111.111"/>
</AppSettings>

and add reference of system.configuration.dll from add reference on right of your project.
then use
configurationManager.AppSettings("Conn")

Edited by __avd: Added [code] tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.