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

 The solution has three parts:
1.) Expose the user control as a property in the code behind of your master page
    public ASP.usercontrols_emailform_ascx EmailForm
            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
  <%@ Register TagName="EmailForm" TagPrefix="uc" Src="~/UserControls/EmailForm.ascx" %>

3.) Cast Master to your master page class and then access the exposed control
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