how to access basepage methods from masterpage??
-
I have these pages: 1) DefaultMaster.Master/cs 2) MyPage.aspx/cs 3) BasePage.cs MyPage.aspx is set to use the DefaultMaster masterpage. MyPage.cs inherits BasePage class (which is derived from the Page class). How can I access methods and properties of the BasePage class from the DefaultMaster.Master.cs codebehind? I cannot find the right syntax to do it. Please help...
-
I have these pages: 1) DefaultMaster.Master/cs 2) MyPage.aspx/cs 3) BasePage.cs MyPage.aspx is set to use the DefaultMaster masterpage. MyPage.cs inherits BasePage class (which is derived from the Page class). How can I access methods and properties of the BasePage class from the DefaultMaster.Master.cs codebehind? I cannot find the right syntax to do it. Please help...
I assume the master page has a property that gives you the page, you then need to cast that to the BasePage type, preferably using the 'as' keyword and checking first that the cast succeeded.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )