Can i get to the application object in a class

Discussion in 'ASP General' started by Murray Jack, Jan 19, 2005.

  1. Murray Jack

    Murray Jack Guest

    Hi

    I am trying to get to the application object from a seperate class in my ASP
    application and I dont want to pass the object in as the class is inherited
    to lots of other classes. So i can have something like the following

    Imports System.Web.UI.WebControls.DataGrid

    Namespace Classes.Inheritable
    Public MustInherit Class EntityCollection

    Implements IDisposable

    Private mobjDataConnection As Classes.Databases.DBConnection

    Public Sub New(ByVal strSQL As String)
    mobjDataConnection = Application("DataConnection")
    End sub

    ........
    Murray Jack, Jan 19, 2005
    #1
    1. Advertising

  2. Murray Jack wrote:
    > Hi
    >
    > I am trying to get to the application object from a seperate class in
    > my ASP application and I dont want to pass the object in as the class
    > is inherited to lots of other classes. So i can have something like
    > the following
    >
    > Imports System.Web.UI.WebControls.DataGrid


    Again, this is the wrong place. Most of us in this newsgroup are still using
    classic ASP.

    There is a reason for having newsgroups focussed on specific topics. You
    will find yourself getting kill-filed by the people whose help you wish to
    receive if you persist in posting off-topic messages. I'm not playing net
    cop here: I know I can't tell you where and what to post. I'm just advising
    you of the potential consequences of ignoring basic netiquette.You may get
    short-term results from ignoring netiquette, but in the long run, you will
    find your questions falling on deaf ears.

    Bob Barrows

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Jan 19, 2005
    #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. E11
    Replies:
    1
    Views:
    4,736
    Thomas Weidenfeller
    Oct 12, 2005
  2. Replies:
    1
    Views:
    1,304
    Jonathan Mcdougall
    Dec 24, 2004
  3. Replies:
    0
    Views:
    513
  4. Thomas Hafner
    Replies:
    15
    Views:
    203
    Rob Pitt
    Mar 22, 2008
  5. Rick DeNatale
    Replies:
    0
    Views:
    86
    Rick DeNatale
    Mar 15, 2007
Loading...

Share This Page