Click here to Skip to main content
15,904,415 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a folder structure like below

MyApp
Subfolder: file.cs and web.config value = x
main.web.config value = y

My query here is : Is it possible to access main web.config file value "Y" access in subfolder file.cs?
or display any error?

I thought Is it possible?<
Posted
Comments
deepankarbhatnagar 11-Jan-16 7:26am    
What have you tried. please show the code

1 solution

Use following code :

C#
System.Web.Configuration.WebConfigurationManager.AppSettings.Get("Root");//Root is your root config app setting key



Good luck
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900