Question : Pass Web Page as Parameter to Class in App_Code Folder

I have a Web Page Defined as:


public partial class MyPage: System.Web.UI.Page
    {
        static bool VAR;
         MethodeA(this); //<<<
    }

Class A {
  MethodeA(MyPage aPage) { << ERROR HERE MyPage Could not be Found
   aPage.VAR = true;
}


I want to PASS MyPage as a Reference to my Class , but I am experiencing Problems.

I am using ASP.NET 2

Answer : Pass Web Page as Parameter to Class in App_Code Folder

It is design of the new ASP.NET 2.0. Assemblies are builded separately at "WebSite" kind of project. These assemblies should not be cross referenced so classes cannot be seen between each other.
Project is builded into one App_Code library and libraries for separate page.

Now you want to convert it to the old style Web application project (http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx), where the classes are globaly visible because it is builded into single assembly.
Random Solutions  
 
programming4us programming4us