On 24 Sep, 19:53, Elroyskimms <elroyski...@yahoo.comwrote:
On Sep 24, 7:52 am, mail747...@fificorp.net wrote:
In VS.NET 2005 I have created a web site with a MasterPage and a
function. I have then created a new folder and put a WebUserControl in
it. How do I access my function in the MasterPage from the
WebUserControl?
You could also try:
ctype(me.master, MyMasterPageClassName).MasterPageFunctionName(Para m1,
Param2)
-E
The problem is that the type (nameofmasterpage or
MyMasterPageClassName) is not available in the user control.
I have found the directive <%@ MasterType VirtualPath="~/masters/
SourcePage.master"" %but it cannot be used in a user control. I have
solved the problem by creating a base class that the master page
inherits from. But it would be better if I could access the master
page itself.