I have a config file named Refer.config which contains the appSettings as:
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="Database" value="CouchDB"/>
</appSettings>
</configuration>
Now in the web.config i have referenced it as:
<appSettings file="C:\Users\312171\Documents\Visual Studio 2008\WebSites\WebSite4\Refer.config">
</appSettings>
Now in the cs file i m trying to access the key value of appSettings like this:
protected void Button2_Click(object sender, EventArgs e)
{
string filetype = ConfigurationManager.AppSettings["Database"];
testvalue.Text = string.Format("The key value is:",filetype);
}
But it is not returning the key value... What mistake i have made?? Please help me out..