Accessing Master Page elements from Content

D

daokfella

Hi all,

I've only just started to use ASP.Net 2.0. I'm an experienced ASP.Net
developer and had a question regarding master pages.

Can you interact with elements that exist on the master page template?
For instance, let's say I wanted to show menu items on the master
page. Depending on what content page I'm on, I want to highlight the
specific menu item in my header. Or perhaps, I may want to add
querystring values to hyperlink controls on the master page template.

Can you point me to a resource that may discuss this further? Thanks.

Jason
 
M

Mark Rae

Can you interact with elements that exist on the master page template?

There's no trickery to MasterPages - a MasterPage is just a UserControl like
any other UserControl...

this.Master.FindControl(<control>).<property> = <value>;
 

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,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top