Accessing control on calling page

  • Thread starter Thread starter John Knoop
  • Start date Start date
J

John Knoop

Hi all

I have a page that contains a label (<asp:label id="lbl" runat="server">).
Further down in that same page, I include the contents of a different page
using Server.Execute.

Now, I need to be able to set the text property of my label from inside that
second page. How can I do this? Want I want to accomplish is a system where
the label displays a different text depending on what page is loaded with
Server.Execute. For example, if I load news.aspx, the label should say
"Headlines" and so on.

I tried to set lbl.text = "Headlines" from inside the Page_Load of the page
being loaded, but since the label physically exists on the "parent page", it
doesn't work out.

Anyone knows how I can do this? It doesn't actually have to be a label--any
solution works for me.


Thanks in advance
 
Back
Top