Improve company productivity with a Business Account.Sign Up

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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