read web.config values

  • Thread starter Thread starter Claudia Fong
  • Start date Start date
C

Claudia Fong

Hi,

Is it possible to read the webconfig values from the server side?


Cheers!

Claudi
 
Hi,

Is it possible to read the webconfig values from the server side?

Cheers!

Claudi

*** Sent via Developersdexhttp://www.developersdex.com***

Take a look in the ConfigurationManager Class

An example:

string cs = ConfigurationManager.AppSettings["ConnectionString"];

returns a string from the appsettings section

<appSettings>
<add key="ConnectionString" value="..."/>
</appSettings>
 

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

Back
Top