CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Jul 2008
    Posts
    29

    Question how to define class object once for entire ASP.NET 2.0 application

    Hello,

    I am developing a project in ASP.NET 2.0 and referencing a class from class library in this project. I have defined an object of that class. for example:

    Dim eClass1 as new Class1

    I want to use this object eClass1 for all the web pages created in ASP.NET project. My first question is where do I define this class, so that it will get initialized only once.

    My second question is:

    Once I defined this object, I will use class methods using dot operator. For example:

    eClass1.Method1()

    I want to call Method1 without using class object and dot operator like it was in VB 6.0

    For Example:

    Method1()

    Can you please help me on this?

    Thank you.
    Last edited by prachi001; July 28th, 2008 at 12:40 AM. Reason: Incomplete Title

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured