can't find control in master page

G

graphicsxp

Hi,
In my master page I have :

<div id="divPageNav" runat="server">
<div id="divPageNavHeader" runat="server">
test</div>
test
</div>
and in the load event of a page that inherits from the master page:

Me.Master.FindControl("ctl00_divPageNav").Visible = False

but the control is not found. I've also tried:

Me.FindControl("ctl00_divPageNav").Visible = False

But it doesn't work either...
can you help ?

thanks
 
P

PeterKellner

Hi,
In my master page I have :

<div id="divPageNav" runat="server">
<div id="divPageNavHeader" runat="server">
test</div>
test
</div>
and in the load event of a page that inherits from the master page:

Me.Master.FindControl("ctl00_divPageNav").Visible = False

but the control is not found. I've also tried:

Me.FindControl("ctl00_divPageNav").Visible = False

But it doesn't work either...
can you help ?

thanks

in your page header, turn trace on and you should see the control
names.
Peter Kellner
http://peterkellner.net
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top