[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

breadcrumbs

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,
0
ErinTheCoderGirl
Asked:
ErinTheCoderGirl
  • 2
  • 2
1 Solution
 
CodeCruiserCommented:
This page shows examples of ways to access master page controls

http://msdn.microsoft.com/en-us/library/xxwa0ff0.aspx
0
 
ErinTheCoderGirlAuthor 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?
0
 
ErinTheCoderGirlAuthor Commented:
Anyone want to have a go at this one?
0
 
CodeCruiserCommented:
As mentioned in your other question, you can go up the hierarchy using

me.Master.Master.Master...
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now