Yes, try to read up on object oriented programming. I don't know what
the hottest books are for OOP beginners these days, but I did a quick
search and everything I found looked sucky.
One of the first steps is to distinguish between a class and an
object.
An example of a class might be Ford. Ford describes a type of car.
Saying cls.func1 is similar to saying
Ford.Accelerate().
It doesn't make much sense because you can't accelerate a type of car,
you have to accelerate a car object.
Dim myCar as New Ford
myCar.Accelerate()
Now I've created an instance of the car, and I'm going to "put the
pedal to the metal" / "drop the hammer" / "gun it" depending on what
slang term you prefer.
In your case you already have an instance available that ASP.NET
created, and the Page variable refers to it. It's just that you have
to give the compiler a little more information about the reference.
You'll lean about this if you read about inheritance and polymorphism
in OOP texts.
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Fri, 26 Nov 2004 10:01:30 -0800,
<an*******@discussions.microsoft.com> wrote:
not realy. i'm sure what you're saying is right i just
can't understand why do i have to use this ctype....i
mean - i'm working on a specific solution, with only 1
object called "cls1" and this is my aspx class name. what
can be more clear then "cls.func1"? especially when cls1
is public! i guess it's this oop that i have to get used
to....