Click to See Complete Forum and Search --> : Access to class properties in global.asax not happening...


WeePecky
February 9th, 2010, 09:47 PM
Hi

I am using Visual Studio 2008 SP1, MVC.NET and the .NET Framework 3.5.
I have added two public properties to the Global.asax class which I want to access from the \Views\Home\Index.aspx page code. The RegisterRoutes is showing up as available but not the two properties I have added...

Is this behaviour as expected (newbie!!) or should I be able to expose these properties as well?

Thanks in advance.

Wee!

nelo
February 10th, 2010, 03:32 AM
I suspect that you have not marked the properties as 'static'. Can you show us how you defined the properties and show us how you are accessing them? It makes things easier if you put a little more detail into the post.

WeePecky
February 10th, 2010, 01:51 PM
Cheers Nelo. Simple and sorted.

Wee!