Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic object / scope question
Message
 
 
To
22/06/2006 15:45:25
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01130935
Message ID:
01130965
Views:
22
>>In an ASP.NET 2005 web site app, with VB as the language, I want to create some objects in the main program (master page) that are accessible to all pages in the app. The master page does most of the I/O and the various content pages basically display that data and allow it to be updated. What is a simple way of accomplishing this? I have tried several approaches with nothing but build errors to show for my efforts. Most of the errors are in the content pages, saying oWhatever is not found. Am I missing something similar to FoxPro's EXTERNAL directive?
>>
>>Someone told me the objects have to be defined in App_Code to be globally accessible. Is that true?
>
>In your global.asax, you may have something like this:
>
>
><object id="LXFramework" runat="server" class="Framework.Framework.App" scope="Application" />
>
>
>Then, this object becomes available in your form load event.


I find references in the help to the ASP.NET application file, glabal.asax, and they discuss how to put global event handlers there. But I haven't been able to find anything yet about how to define globally available objects or variables there. The closest I can find is web.config and that doesn't seem like a very place to put the data I am trying to handle.

What is LXFramework? What is Framework.Framework.App? Are those generic or are they specific to your web site? If the latter, what type of modules are they?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform