Access application settings from ASP.Net MVC View

Saajid Ismail picture Saajid Ismail · Jun 26, 2009 · Viewed 17.4k times · Source

In an ASP.Net MVC 1.0 applicati0n, is it possible to access the application settings (MyProject.Properties.Settings.Default.*) from inside my View (aspx page)?

I've tried but the intellisense and compiler don't like it. It says that it is inaccesible due to the protection level.

Answer

Kieran picture Kieran · Sep 20, 2011

I had a similar issue to Saajid Ismail where my settings were in the namespace.Properties.Settings.Default.Setting they were there as they are strongly typed..

To make them accessible I simply had to change the access modifier enter image description here