Master Page Question

J

Jeff

....have a master page with a contentplaceholder.

From code in the master page itself, how can I determine whether the content
page is using the placeholder's default master content or using the content
page's content?

Thanks

Jeff
 
P

PlatinumBay

Jeff,

I tested this in the PreRender event of the Master page,

Me.ContentTemplates.Count > 0

If I used the default master content, Count = 0. If I used the content
page's content, Count = 1.


Hope this helps,

Steve
 

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

Top