>I want to pass object 'this' from a page code to a static method in a class in .cs file. In the called method, I need to define what type is this object. How do I define it?
If you use standard ASP.NET projects the class name is dynamically generated so the name is not available to you, at least not for the final class. You CAN pass the name of your code file class however.
loObj.MyMethod( (MyNamespace.MyPage) this );
With Web Application projects you can define the name of the generated class as well and you can use that name instead and get full support.
In general though I don't think this is a good idea. You should never pass a Page object to anything. If anything you should create an interface that has the properties/methods you want to expose and then have the page in question implement that interface, but even that is not a good idea. THere's no reason you should ever pass a user interface component around.
Instead any data you care about should be attached to some sort of data object (or a business object) and you acan then pass THAT around more effectively.
+++ Rick ---
>
>Here is an example:
>
>
>// in the calling program:
>MyClass.MyMethod( this )
>
>
>
>
>// in the .CS file
>public static void MyMethod( 'type of object' ThisObject )
>// What should be in the 'type of object'?
>