Accessing control on calling page

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top