HttpApplicationState question..

Discussion in 'ASP .Net' started by Rajesh.V, Jan 7, 2004.

  1. Rajesh.V

    Rajesh.V Guest

    I saw this code

    protected void Application_Start(Object sender, EventArgs e)
    {

    // Initialize the Environment

    new SomeObject.

    }



    Does this mean to be the same as

    Application.Add("Environment", someobject);
    Rajesh.V, Jan 7, 2004
    #1
    1. Advertising

  2. Rajesh.V

    Paul Glavich Guest

    No, the "new SomeObject" in the Application_Start event, will only exist
    within the scope of that event. The Application.Add(...) statement adds a
    new application variable named "Environment" with a value of "someObject"
    that *does* exist for the lifetime of the application.

    --
    - Paul Glavich


    "Rajesh.V" <> wrote in message
    news:#...
    > I saw this code
    >
    > protected void Application_Start(Object sender, EventArgs e)
    > {
    >
    > // Initialize the Environment
    >
    > new SomeObject.
    >
    > }
    >
    >
    >
    > Does this mean to be the same as
    >
    > Application.Add("Environment", someobject);
    >
    >
    >
    >
    >
    Paul Glavich, Jan 7, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Natan
    Replies:
    5
    Views:
    1,588
    Natan
    Sep 27, 2004
  2. moi
    Replies:
    2
    Views:
    658
  3. mnowosad

    HttpApplicationState data being lost

    mnowosad, Sep 16, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    729
    Guest
    Sep 17, 2008
  4. Ajay Choudhary

    Accessing HttpApplicationState object from SoapExtension

    Ajay Choudhary, May 16, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    134
    Brock Allen
    May 18, 2005
  5. nano2k

    HttpApplicationState and lock() question

    nano2k, Sep 13, 2007, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    220
    nano2k
    Sep 13, 2007
Loading...

Share This Page