Saturday, March 31, 2012

web.config file path configuration

In my web.config file I have the following:

<

appSettings> <addkey="FaceBookLg"value="~/images/facebook/large/"/>

</appSettings>

In my code behind file I am trying to reference this with the following code, but it's not working. What am I doing wrong? Thanks.

string filepathLarge = ConfigurationSettings.AppSettings["FaceBookLg"];

Hi,

That code works fine for me running under .NET 2.0.

Would you please be more specific about what is happening when you execute the code? Do you receive an error message?


I had the path wrong to begin with. It works fine now. Thanks.

0 comments:

Post a Comment