page class access
I am trying to access a Page class from another class. For example I have a page:
Page: MyPage.aspx
Code Behind: MyPage.aspx.cs
I have a public static method in MyPage.aspx.cs called "GetName". When I try and reference that method: MyPage.GetName() from another code behind class, intellesense can't find the "MyPage" class, but it will compile and work. When I try to access the same method from the code behind of a master page, it won't even compile. It says it can't find the type "MyPage". All the pages reside in the same directory.
So the question is, how do you access the class of a page from other pages? This works fine using ASP.NET 1.1
-Jon
|