Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 265175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:44:49+00:00 2026-05-11T22:44:49+00:00

I have a sitemap that has a link for when a user is not

  • 0

I have a sitemap that has a link for when a user is not logged in, but when they do login, the link should change, for example, nonmember.aspx should change to member.aspx. This sitemap is tied to an asp:menu. Does anyone know how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:44:49+00:00Added an answer on May 11, 2026 at 10:44 pm

    A simple solution is to have two nodes in your sitemap.

    1. One node shows up for Anonymous users.
    2. One node shows up for Authenticated users with the security access

    I believe you can set this up quite simply.

    The end result is the same as changing the link but it’s easier to maintain.

    To add to this:

    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
        <siteMapNode title="Home" url="~/" roles="*">
            <siteMapNode url="~/Member.aspx" title="Home" roles="SpecialPeople" />
            <siteMapNode url="~/Nonmember.aspx" title="Site Map" roles="HideForUsers" />
        </siteMapNode>
    </siteMap>
    

    So, you set up a rule that denies access to the “HideForMembers” role to authenticated users. It’s something like that. ASP.NET will take the first rule it finds a match, so you should be able to accomplish it this way.

    Otherwise, you could do a Menu_OnDataBound and look for the node:

    Protected Sub menMainDataBound(ByVal sender As Object, ByVal e As System.EventArgs)
    
        Try
    
            Dim myPage As New Page
            Dim myPrincipal As IPrincipal
            Dim colNodes As New Collection
    
            myPrincipal = myPage.User
    
            If myPrincipal.Identity.IsAuthenticated = True Then
    
                    Dim menNode As MenuItem
    
                    For Each menNode In menMain.Items
    
                        Select Case menNode.Value.ToString
                            Case "Products"
                                colNodes.Add(menNode)
                            Case "Contact Us"
                                colNodes.Add(menNode)
                            Case "About Us"
                                colNodes.Add(menNode)
                            Case "Links"
                                colNodes.Add(menNode)
                        End Select
    
                    Next
    
                    For Each menNode In colNodes
                        menMain.Items.Remove(menNode)
                    Next
    
             End If
    
        Catch ex As Exception
    
        End Try
    
    End Sub
    

    source

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 131k
  • Answers 131k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer They're different URLs. http://my.domain.com/my/webservice implies a file webservice in the… May 12, 2026 at 6:11 am
  • Editorial Team
    Editorial Team added an answer I've actually implemented this very same feature. Paperclip generates thumbnails… May 12, 2026 at 6:11 am
  • Editorial Team
    Editorial Team added an answer Have you tried looking into the ServiceSecurityContext? May 12, 2026 at 6:11 am

Related Questions

Short question: Has anybody got any C# code to parse robots.txt and then evaluate
I've got a master page which has a function in it called GetSiteMap() ,
i've been tasked with re-organizing a pure HTML site into a CMS. if all
I'm currently creating an admin tool for a new project which I would like

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.