simple link disabling on current page

J

jonefer

Steve C Or has an article 'Automating Navigational Chores'--- .
(which, don't get me wrong-- it's really nice, but I can't use the colorful
panels for my business solution)

Can someone help me remove the reference to the panels and just create
simple Text hyperlinks?

===Code=====

'loop through each child node

'and create a hyerlink to the page.

For Each Child As SiteMapNode In SMN.ChildNodes

pnl.Controls.Add(New LiteralControl("&nbsp"))



If Child.Url.Length > 0 AndAlso _

SiteMap.CurrentNode.Url = Child.Url Then

'if the link is to the current page

'then don't display a hyperlink

pnl.Controls.Add(New LiteralControl("<b>" & _

Child.Title & "</b>"))

Else

'display a hyperlink to the page

Dim h As WebControls.HyperLink = _

New WebControls.HyperLink()

h.NavigateUrl = Child.Url

h.Text = Child.Title

h.ToolTip = Child.Description

pnl.Controls.Add(h)

End If

CreateIcon(Child, pnl)

pnl.Controls.Add(New LiteralControl("<br/>"))

Next

My site has a 'Member search' page and an 'Appointments' page... basically
these - so far are the only links that I want to use a 'SiteMapPath' (bread
crumbs) with.

There are 2 other pages, a 'User Admin' and 'Control Panel' that I don't
mind manually writing code to hide them.

But I built a master page, and would like to use the SiteMap to determine a
simple solution to disable the Member Search page - "FindMember.aspx" (which
is also the home page) only show the Appointments link.. and Visa Versa (show
the Member search link) when on the Appointments page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top