Using objects in ASP.NET?

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

In Coldfusion MX 6.1, they offer a feature named CFC or Coldfusion
components. These are basically classes that offer inheritence. I put
database calls, calculations, constants, etc, into these classes or
components. I instantiate them once for each user session through the
Application.cfm. Now the objects are loaded and available to the user
persistently because they are stored in session variables. This keeps me
from having to do file includes in my templates and avoids unnecessary disk
hits (file includes).

Does ASP.NET offer anything similar to the above?

Thanks,
Brett
 
ASP.Net doesn't, but object oriented programming does. Luckily, ASP.Net
runs off of object oriented languages, such as C# and VB.Net, which both
support static/shared members

public class Utility
public shared function DoSomething() as string
return "something"
end function
end class


in your code you can create
Utility.DoSomething()

Karl


--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 
Yes
You have Session and Cache objects, also Application object...

Regards,
Kostadin Kostov
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top