hiding treeview node for annonymous users

Last post 11-11-2009 1:29 PM by sparrow37. 6 replies.

Sort Posts:

  • hiding treeview node for annonymous users

    11-04-2009, 1:13 PM
    • Member
      250 point Member
    • sparrow37
    • Member since 08-25-2008, 8:53 AM
    • Posts 417

    Hi all,

    I have a treeview control in my master page and login control as well. treeview has a link 'change password' . I have used change password control on that page. I want to make sure that change password link  is available  in treeview user is logged in. How to hide it for annonymous users. Please helpme on this.

    Regards,

    Asif Hameed

  • Re: hiding treeview node for annonymous users

    11-04-2009, 1:51 PM
    Answer
    • All-Star
      36,592 point All-Star
    • rtpHarry
    • Member since 10-01-2006, 12:51 PM
    • Lincoln, England
    • Posts 5,909

    are you binding your menu from your web.sitemap file?

    If you are then you can enable security trimming to automatically hide this.

  • Re: hiding treeview node for annonymous users

    11-04-2009, 1:59 PM
    • Member
      250 point Member
    • sparrow37
    • Member since 08-25-2008, 8:53 AM
    • Posts 417

    Thanks for your response.

    I dont have enabled roles in my application. How Can I accomplish this without adding roles attribute in sitemap node.

    Regards,

    Asif Hameed

  • Re: hiding treeview node for annonymous users

    11-05-2009, 8:57 PM
    • Member
      250 point Member
    • sparrow37
    • Member since 08-25-2008, 8:53 AM
    • Posts 417

    Suggestion please?  I need help urgently.

    Regards,

    Asif Hameed

  • Re: hiding treeview node for annonymous users

    11-09-2009, 9:48 PM
    Answer

    Um, using session or cookie to store the logined user's information, for example, the user's IDs, or emails, and now according to these information to generate nodes for TreeView control dynamically.

    Hong-Gang Chen
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: hiding treeview node for annonymous users

    11-11-2009, 7:06 AM
    Answer
    • All-Star
      36,592 point All-Star
    • rtpHarry
    • Member since 10-01-2006, 12:51 PM
    • Lincoln, England
    • Posts 5,909

    sparrow37:

    Thanks for your response.

    I dont have enabled roles in my application. How Can I accomplish this without adding roles attribute in sitemap node.

    Regards,

    Asif Hameed

    Why make things difficult for yourself? Enabling roles is simple and you dont have to use the feature for anything other than this.


    You don't have to setup roles for all of your users - there are some built in ones which will meet your needs:

    * means all authenticated users

    ? means anonymous users

  • Re: hiding treeview node for annonymous users

    11-11-2009, 1:29 PM
    • Member
      250 point Member
    • sparrow37
    • Member since 08-25-2008, 8:53 AM
    • Posts 417

    Can some one please send me code sample, link of site where it is done ? What i need to put in web.config and what I  need to use in my treeview nodes ?

Page 1 of 1 (7 items)