Global objects

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David

    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.
  • Alex Korchemniy

    #2
    RE: Global objects

    Simply use HttpSessionStat e like this:

    Session["key"] = value;

    See more on MSDN:
    Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


    Alex Korchemniy

    "David" wrote:
    [color=blue]
    > 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.[/color]

    Comment

    • David

      #3
      RE: Global objects

      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:
      [color=blue]
      > Simply use HttpSessionStat e like this:
      >
      > Session["key"] = value;
      >
      > See more on MSDN:
      > http://msdn.microsoft.com/library/en...ssionstate.asp
      >
      > Alex Korchemniy
      >
      > "David" wrote:
      >[color=green]
      > > 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.[/color][/color]

      Comment

      Working...