Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Framework object and making reference to it
Message
From
17/04/2006 17:04:10
Keith Payne
Technical Marketing Solutions
Florida, United States
 
 
To
17/04/2006 16:56:59
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01114144
Message ID:
01114162
Views:
22
>>Ohhh. I get it now. Is this a web forms application? There is an Application() object cache that is accessible from everywhere. In global.asax, declare a public property and use Application("Framework.App") as the store:
>>
>>
>>Public Class Global
>>    Inherits System.Web.HttpApplication
>>
>>Public Property myApp As Framework.App
>>    Get
>>        If Application("Framework.App") Is Nothing Then Application("Framework.App") = New Framework.App
>>        Return Application("Framework.App")
>>    End Get
>>    Set (ByVal Value as Framework.App)
>>        Application("Framework.App") = Value
>>    End Set
>>End Property
>>
>>End Class
>
>Yes, I thought about that but as I need something that will fit Desktop application, Web Services and ASP.NET applications, I wasn't sure if it was doable. Can I use such approach from a Web Service as well?

It works for a web service too. In a win forms app, you can declare a 'global' the variable in the Main module (I think).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform