you aren't declaring mainHeader1 *g*
I take it on your page you have
it's hard to know what's wrong without seeing the html...
but looking at it, I'd expect to see:
In the page:
<sometag:somecontrol1 id="mainHeader1" runat="server" />
in somecontrol1:
<sometag:somecontrol2 id="sectionHeader1" runat="Server" />
in somecontrol2:
<asp:label id="theSectionHeader" runat="erver" />
Then in page codebehind
protected mainHedaer1 as somecontrol
sub page_load
mainHeader1.sectionHeader1.theSectionHeader.text = "Eritrea"
end sub
in somecontrol1 codebehind:
public sectionHeader1 as somecontrol2
in somecontrol2
public theSectionHeader as label
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:eR**************@TK2MSFTNGP09.phx.gbl...
I've got a web user control (a) inside a web user control (b) inside a
webform (c). I need the webform to set a label control text value inside
the inner of the two web user control.
Inside my web form's code behind I have:
mainHeader1.sectionHeader1.theSectionHeader.text = "Eritrea"
I'm getting "mainHeader1 is not declared" error.
What am I doing wrong?
--
_____
DC G