Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

breadcrumbs

Posted on 2014-03-06
4
198 Views
Last Modified: 2014-03-24
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
Comment
Question by:ErinTheCoderGirl
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39909023
This page shows examples of ways to access master page controls

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

Author Comment

by:ErinTheCoderGirl
ID: 39909165
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
 

Author Comment

by:ErinTheCoderGirl
ID: 39911978
Anyone want to have a go at this one?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39912159
As mentioned in your other question, you can go up the hierarchy using

me.Master.Master.Master...
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question