Home All Groups Group Topic Archive Search About
Author
8 Jul 2006 5:26 AM
Tom
Please forgive me if I have posted to the wrong group.  I have been reading
for two days now and everything points to the direction that I can do it but
I can't get any code to work.  I an new to .NET so please forgive my
ignorance.  Simply put I have a site and the navigation is working fine,
breadcrumb, treeview... Now I just added an "Admin" section (I've got all the
authentication working) and I want to add a few siteMap items to the treeview
ONLY if the user has been authenticated.  The link to the "Admin" section is
not public and does not need to be seen by anyone, admin's will know to add
/admin to the url.  What I am trying to do is this:

Anonymous users will see:

   Home
      Item 1
      Item 2
      Item 3

But Authenticated users I want to see:

  Admin Home
    Admin Item 1
    Admin Item 2
  Home
    Item 1
    Item 2
    Item 3

How do I achieve this?  I'm lost, I'm new so lots of code will help!

Thanks,
Tom

Author
24 Jul 2006 4:36 AM
Gary Vidal
You could use the roles attribute on the sitemap
where you define the roles for each page.
Or you could use a LoginView control to present the appropriate menus


--
Gary Vidal
Show quoteHide quote
"Tom" <T**@discussions.microsoft.com> wrote in message
news:5EAA06EE-AB76-431E-BB2E-C863A6AF6E33@microsoft.com...
> Please forgive me if I have posted to the wrong group.  I have been
> reading
> for two days now and everything points to the direction that I can do it
> but
> I can't get any code to work.  I an new to .NET so please forgive my
> ignorance.  Simply put I have a site and the navigation is working fine,
> breadcrumb, treeview... Now I just added an "Admin" section (I've got all
> the
> authentication working) and I want to add a few siteMap items to the
> treeview
> ONLY if the user has been authenticated.  The link to the "Admin" section
> is
> not public and does not need to be seen by anyone, admin's will know to
> add
> /admin to the url.  What I am trying to do is this:
>
> Anonymous users will see:
>
>   Home
>      Item 1
>      Item 2
>      Item 3
>
> But Authenticated users I want to see:
>
>  Admin Home
>    Admin Item 1
>    Admin Item 2
>  Home
>    Item 1
>    Item 2
>    Item 3
>
> How do I achieve this?  I'm lost, I'm new so lots of code will help!
>
> Thanks,
> Tom
>