473,225 Members | 308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

Global objects

Hi.

I am developing an ASP.NET application. I have several classes that I
developed that store user information and certain things that they do while
working with the application.

All those classes need to be available from the time user signs in to the
application and until user logs out. Also, they need to be local to the
user who is logged in to the current session. How should I create those
object instances so they are local to the user and seen from any page within
the application? Thanks for the help.
Jul 21 '05 #1
2 1226
Simply use HttpSessionState like this:

Session["key"] = value;

See more on MSDN:
http://msdn.microsoft.com/library/en...ssionstate.asp

Alex Korchemniy

"David" wrote:
Hi.

I am developing an ASP.NET application. I have several classes that I
developed that store user information and certain things that they do while
working with the application.

All those classes need to be available from the time user signs in to the
application and until user logs out. Also, they need to be local to the
user who is logged in to the current session. How should I create those
object instances so they are local to the user and seen from any page within
the application? Thanks for the help.

Jul 21 '05 #2
Thanks. I am doing it with some variables but the object I need to be
available for the duration of the user session are big and it affects
performance so I do not want to use session variables. I was wondering if
there is another way to do so.

"Alex Korchemniy" wrote:
Simply use HttpSessionState like this:

Session["key"] = value;

See more on MSDN:
http://msdn.microsoft.com/library/en...ssionstate.asp

Alex Korchemniy

"David" wrote:
Hi.

I am developing an ASP.NET application. I have several classes that I
developed that store user information and certain things that they do while
working with the application.

All those classes need to be available from the time user signs in to the
application and until user logs out. Also, they need to be local to the
user who is logged in to the current session. How should I create those
object instances so they are local to the user and seen from any page within
the application? Thanks for the help.

Jul 21 '05 #3

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

Similar topics

2
by: Gianguz | last post by:
I'd like to discuss about the opportunity to have a global objects creator that introduces into a general framework (suited for multithreading) a controlled semantic to manage globals variables...
2
by: Thomas Matthews | last post by:
Hi, I'm getting linking errors when I declare a variable in the global scope, but not inside a function. The declarations are the same (only the names have been changed...). class Book {...
8
by: john townsley | last post by:
whats the best way to declare Global objects (holding say 10 member variables and functions) of an unknown size in c++, memory efficient as possible thanks
59
by: seberino | last post by:
I've heard 2 people complain that word 'global' is confusing. Perhaps 'modulescope' or 'module' would be better? Am I the first peope to have thought of this and suggested it? Is this a...
10
by: David P. Donahue | last post by:
When I wrote websites in VB .NET, I would often put functions in Global for all the pages to call. Now, in C#, doing so results in "references to non-static objects" and whatnot. I realize what...
15
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
8
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...
23
by: David Colliver | last post by:
Hi, using c#, 1.1 I know that we are not supposed to use global variables etc. in c# I am having a problem, but not sure how to resolve. I did have another post here, but may have over...
24
by: onnodb | last post by:
Hi all, Currently, I'm working on an Access XP database app that uses two global objects in its code. These two objects are instances of "controller classes". For example, one of them manages...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.