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.

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")
...........

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")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.