Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

accessing keys added in web.config

  Asked By: Loretta    Date: Oct 12    Category: Asp.net    Views: 1034
  

I'm trying to protect my database connection strings by placing
them in the <appSettings> tag of my web.config file using <add key=
[name] value=[value]> statements. How do I access these from
my .aspx code-behind functions?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Vilhelm Fischer     Answered On: Oct 12



Import the System.Configuration namespace.

Dim myVar as String = ConfigurationSettings.AppSettings("myKey")

 
Didn't find what you were looking for? Find more on accessing keys added in web.config Or get search suggestion and latest updates.




Tagged: