breadcrumbs

ErinTheCoderGirl
ErinTheCoderGirl used Ask the Experts™
on
Hi  all,

I'm trying to setup a breadcrumb in an asp.net vb website in vs2010.   I'm using master pages, aswell as nested master pages...

I'm using the below code for the master page using the web form's page_load, this works fine... even though isn't there a way to use the Page directive's Title tag?


sub page_load
    Dim lblBreadCrumbs As Label  = CType(Master.FindControl("lblBreadCrumbs"), Label)
    lblBreadCrumbs.Text = "Home Page"
end sub

This works fine on the webform one level down from the master page with the lblBreadCrumbs label control existing in the masterpage.

However, how do i access this same label control in a nested master page, another level down?

is there a better way of achieving breadcrumbs in a nested master page website?

Thanks,
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014

Commented:
This page shows examples of ways to access master page controls

http://msdn.microsoft.com/en-us/library/xxwa0ff0.aspx

Author

Commented:
Hi - I've gone through the 4 examples in the download script from that page,  None of them answer my problem, they only reference how to access masterpage from the one level down... and not nested master pages, as I'm using.

Example 2 was the closest, but their solution is what I'm already using, as above.


Any ideas that relate directly to nested master pages?

Author

Commented:
Anyone want to have a go at this one?
Most Valuable Expert 2012
Top Expert 2014
Commented:
As mentioned in your other question, you can go up the hierarchy using

me.Master.Master.Master...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial