Get value from usercontrol

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there. I have a value in a user control which i want to obtain frequently
from the pages which embed the user control. I have done the code to expose
the property, making it public, but what is the syntax for retrieving it from
the page? I have attached the user control by registering it in the
directives:

<%@ Register TagPrefix="myprefix" Tagname="navigationbar"
src="controls/navbar.ascx"%>

and then I call it later in the page with:

<magenta:myprefix runat="server" CurrentPage="Personal" id="navigationbar1" />

but how do i effectively call

string val = navigationbar1.exposedpublicproperty ? it doesnt recognise the
properties of the user control..because it cant read the class on the fly
presumably?
 
Back
Top