Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 28, 2012 05:53 PM by Partyz
Dec 27, 2012 04:04 PM|LINK
You can declare them in the global.asax file.
public class MvcApplication : HttpApplication
public static string MyGlobalVariable = "somevalue";
Then you can access them in view like this (my project is called Administration):
Or in classes like this:
Dec 27, 2012 08:53 PM|LINK
Dec 28, 2012 01:40 PM|LINK
You can make a folder and put a class file in it. In this class file declare your variables. You can access these in any view. So, for example, I made a folder called NewFolder1. In that folder I put a class file called Class1.cs. In that file I put
public class Class1
public static readonly string testing = "testing";
In my view I put this (Administration is my project name):
This worked. Does this meet your requirement? You can let your localization team add variables to the Class1.cs file and then add those changes into your main project and compile it?
Dec 28, 2012 05:53 PM|LINK