0

I'm using Asp.net with Vb and I Have user control and I put it inside My master page I need to access this UC Properties and methods from child Page.

Any help please,

Amr Elnashar
  • 1,739
  • 12
  • 33
  • 53

1 Answers1

0

In the child page add this directive:

<%@ MasterType TypeName="MasterPage" %>

Then, the Master property of the child page will have all the type information.

Steve Wellens
  • 20,506
  • 2
  • 28
  • 69
  • I already has this directive and I added property at the master page it get and set the UC also Inside child page I can see methods and properties of UC put it gives me an error related to reference. – Amr Elnashar Dec 25 '11 at 17:39
  • It gives you an error? Perhaps the error message would be helpful and you could share it. And, you've tested the User Control in a standard page so you know it works..right? – Steve Wellens Dec 25 '11 at 17:57
  • Here is the error message : error BC30652: Reference required to assembly 'App_Web_transaltedbreadcrumb.ascx.cdcab7d2.padttqug, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'TransaltedBreadCrumb'. Add one to your project. also yes I tested the User Control in a standard page and its working properly .. – Amr Elnashar Dec 25 '11 at 18:10
  • Perhaps your user control is based on a class that is in an assembly you haven't added to your project (as a reference). – Steve Wellens Dec 26 '11 at 03:18