开发者

ASP.NET custom user control cannot access sitemap

开发者 https://www.devze.com 2022-12-27 20:35 出处:网络
I have a footer that I am adding to a开发者_StackOverflow中文版 masterpage. Within this footer, if constructs menus based on the Current Node of the sitemap, however the sitemap is coming back as null

I have a footer that I am adding to a开发者_StackOverflow中文版 masterpage. Within this footer, if constructs menus based on the Current Node of the sitemap, however the sitemap is coming back as null. Does anyone know how to fix this issue.

Thank you


Try using Page.Master.FindControl()

this.Page.Master.FindControl("SiteMapID1");


I figured this out last night. I just grabbed the SiteMap root node from the Master Page.

0

精彩评论

暂无评论...
验证码 换一张
取 消