473,508 Members | 2,295 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Global.asax

I don't understand how to access my global objects?

I have this global.asax file:

<%@ Application Codebehind="Global.asax.cs" Inherits="AlbumService.Global"
%>
<object id="AlbumSettings" runat="server" class="AlbumService.Settings"
scope="Application" />

According to http://www.csharphelp.com/archives/archive206.html the object
should be available everywhere in this Application through a Property named
"AlbumSettings" after the object-id? But I just keep getting this
error-message:

"The type or namespace name 'AlbumSettings' could not be found (are you
missing a using directive or an assembly reference?)"

Im using VS.NET 2003 and C#.

/Andreas
Nov 19 '05 #1
2 3949
Namespace name goes here . Class name goes here . public
method/property/event
Global.myClass.myValue roughly

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"Andreas Zita" <an******@student.liu.se> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
I don't understand how to access my global objects?

I have this global.asax file:

<%@ Application Codebehind="Global.asax.cs" Inherits="AlbumService.Global"
%>
<object id="AlbumSettings" runat="server" class="AlbumService.Settings"
scope="Application" />

According to http://www.csharphelp.com/archives/archive206.html the object
should be available everywhere in this Application through a Property
named "AlbumSettings" after the object-id? But I just keep getting this
error-message:

"The type or namespace name 'AlbumSettings' could not be found (are you
missing a using directive or an assembly reference?)"

Im using VS.NET 2003 and C#.

/Andreas

Nov 19 '05 #2
Namespace name goes here . Class name goes here . public
method/property/event
Global.myClass.myValue roughly

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc
"Andreas Zita" <an******@student.liu.se> wrote in message
news:ub**************@TK2MSFTNGP10.phx.gbl...
I don't understand how to access my global objects?

I have this global.asax file:

<%@ Application Codebehind="Global.asax.cs" Inherits="AlbumService.Global"
%>
<object id="AlbumSettings" runat="server" class="AlbumService.Settings"
scope="Application" />

According to http://www.csharphelp.com/archives/archive206.html the object
should be available everywhere in this Application through a Property
named "AlbumSettings" after the object-id? But I just keep getting this
error-message:

"The type or namespace name 'AlbumSettings' could not be found (are you
missing a using directive or an assembly reference?)"

Im using VS.NET 2003 and C#.

/Andreas

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
3728
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
12
3798
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
8
4845
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical...
5
14983
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
2
3690
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How...
11
8318
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the...
4
3019
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the...
16
5010
by: thefritz_j | last post by:
We just converted our VS2003 1.1 VB web project (which was working fine) to VS2005 2.0 and now I get: Parser Error Message: Could not load type '<Namespace>.'. Source Error: Line 1: <%@...
8
13175
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project...
15
2528
by: =?Utf-8?B?UGF0Qg==?= | last post by:
Just starting to move to ASP.NET 2.0 and having trouble with the Global.asax code file. In 1.1 I could have a code behind file for the global.asax file. This allow for shared variables of the...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.