This is made more difficult in 2.0 :(
The only way I know around it at this point is to place an interface for
your default class in app_code and reference the interface rather then the
class.
public interface IDefault
public property Name as string
end interface
partial class _Default
inherits Page
Implements IDefault
public property name as string
get ..
set..
end property
end class
public Class Class1
private _def as IDefault
....
end class.
Karl
--
http://www.openmymind.net/ http://www.fuelindustries.com/
"Nick Zdunic" <Ni********@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
In 1.1 it was possible to refer to a web page class from another class
I've just started in v2.0 and found that this code sn't working
The web page class:
Partial Class _Default
Inherits System.Web.UI.Page
End Class
The class that want to refer to this:
Public Class Class1
Private _def As _Default
End Class
The _def variable wont compile as _Default is not defined.
Is there a directive I'm missing?