View Single Post
  #9 (permalink)  
Old March 7th, 2008, 08:52 AM
kpayson kpayson is offline
Registered User
 
Join Date: Mar 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 The solution has three parts:
1.) Expose the user control as a property in the code behind of your master page
ex:
    public ASP.usercontrols_emailform_ascx EmailForm
    {
        get
        {
            return ucEmail; //this is the id of the control on the master page
        }
    }

2.) Register your control both on the master page and on the aspx page
ex:
  <%@ Register TagName="EmailForm" TagPrefix="uc" Src="~/UserControls/EmailForm.ascx" %>


3.) Cast Master to your master page class and then access the exposed control
ex:
ASP.usercontrols_emailform_ascx ucEmail = ((ASP.mainmaster_master)Master).EmailForm;

My thanks to previous posters whose posts helped me figure out all of the details
Reply With Quote