troubleshooting Question

OO - trying to understand the principles of using objects with

Avatar of najh
najhFlag for United Kingdom of Great Britain and Northern Ireland asked on
.NET ProgrammingASP.NETWeb Applications
9 Comments1 Solution811 ViewsLast Modified:
I'm a relative newbie to but I'm relatively familiar with ASP classic and I have a reasonable understanding of object oriented languages such as Java. (and C# seems very similar to me, so that's what I've been using in my early development).

I'm quite happy with most of my learning, but there's a big hole in my understanding - and I'd like some lovely experts to come along and explain some things to me in order to fill this chasm.

Right, lets say I have a web page for some customers and I want to hold some details about the customer who is logged in. Some of these details will be from what the user has supplied, like userid and password, and some of the details will be from the database which holds all the other details about the customer of course.

So, in my mind I'd like to instantiate a customer object, in which I'd hold various details. If the customer was to buy anything, I'd attach a shopping cart object and then some "shopping cart item" objects. Make sense?

Anyway, I can't understand how on earth this sort of thing works with I can create my customer object and I can call methods etc from an page, but then what if i want to access my customer object on the next page? How do i do that? I can't go an re-create the customer object can i. (well I can, but that's obviously a bit silly) Am I mean to keep some kind of reference to something? I just don't quite get it. Is it anything to do with Server Objects? (and if so how?)

So, I'd love an explanation. I've googled for many many hours and read (skimmed) a couple of books, but I still don't feel like I quite get this. I also realise I could hold this kind of data in a Session object, but that seems wrong. Surely the whole point of this is to use an object oriented methodology?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros