Solved

class module dispose - ASP.net app

Posted on 2011-02-12
7
289 Views
Last Modified: 2012-05-11
I want certain stuff to fun automatically when I dispose of my class module (disconnect from database etc) what procedure should I put that kind of stuff in?
0
Comment
Question by:vbnetcoder
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 9

Expert Comment

by:s_chilkury
ID: 34878720
0
 
LVL 12

Expert Comment

by:starlite551
ID: 34879507
Use garbage Collector's Collect method on ur class module..
GC.Collect(object target)

Open in new window

0
 
LVL 12

Accepted Solution

by:
starlite551 earned 500 total points
ID: 34879530
Sorry the correct way to call is this way :
GC.Collect();

Open in new window

0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34879979
If its a form, use the Closing event. If its module, use the appropriate (i think its Application.Exit) in application events file (access through Project Properties)
0
 

Author Comment

by:vbnetcoder
ID: 34999317
I am still looking at this issue.  I want this to stay open for now
0
 

Author Closing Comment

by:vbnetcoder
ID: 35296319
ty
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35296518
>what procedure should I put that kind of stuff in?
So would you be putting your stuff in GC.Collect procedure?
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question