question about sitemap architecture

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andy Sutorius via DotNetMonster.com

    question about sitemap architecture

    I don't know if what I am trying to do can be done with sitemap. Let me
    bounce this arch. off of you and give me your opinion. I have a default.aspx
    that i have a treeview/web.sitemap in. I have a class file that inherits from
    StaticSiteMapPr ovider. I call initialize from the default.aspx.cs and pass in
    the connection string. I then call BuildSiteMap which is in the class from
    default.aspx.cs . In BuildSiteMap I want to walk the child nodes and check the
    roles in the sitemap. If the roles equal a bit setting from a field in a
    table called superuser then I want to display the menu category. I am running
    into all types of different errors almost as if what I am trying to do can't
    be done.

    --
    Message posted via http://www.dotnetmonster.com
  • Wouter van Vugt

    #2
    Re: question about sitemap architecture

    Hi Andy,

    check out http://msdn.microsoft.com/msdnmag/code05.aspx, it implements
    a custom SiteMapProvider .
    Btw, instead of calling to your SiteMapProvider directly, use a
    SiteMapDataSour ce control and set its Provider property to the name of
    your provider. Before doing so, you should register your provider in
    the web.config file.

    Grtz,

    Wouter van Vugt
    Trainer - Info Support


    Comment

    • Andy Sutorius via DotNetMonster.com

      #3
      Re: question about sitemap architecture

      I pulled up SiteMapDataSour ce in the Obj. Browser. Based on the articles I
      have read I thought SMDS was to be used when you stored the sitemap in a
      database, which I am not doing. Am I incorrect?

      public class SiteMapDataSour ce : System.Web.UI.H ierarchicalData SourceControl
      Member of System.Web.UI.W ebControls

      Summary:
      Provides a data source control that Web server controls and other controls
      can use to bind to hierarchical site map data.



      Wouter van Vugt wrote:[color=blue]
      >Hi Andy,
      >
      >check out http://msdn.microsoft.com/msdnmag/code05.aspx, it implements
      >a custom SiteMapProvider .
      >Btw, instead of calling to your SiteMapProvider directly, use a
      >SiteMapDataSou rce control and set its Provider property to the name of
      >your provider. Before doing so, you should register your provider in
      >the web.config file.
      >
      >Grtz,
      >
      >Wouter van Vugt
      >Trainer - Info Support
      >http://blogs.infosupport.com/wouterv[/color]

      --
      Message posted via http://www.dotnetmonster.com

      Comment

      • Andy Sutorius via DotNetMonster.com

        #4
        Re: question about sitemap architecture

        I don't see the article you mentioned. I see a membership in November. Can
        you clarify?

        Wouter van Vugt wrote:[color=blue]
        >Hi Andy,
        >
        >check out http://msdn.microsoft.com/msdnmag/code05.aspx, it implements
        >a custom SiteMapProvider .
        >Btw, instead of calling to your SiteMapProvider directly, use a
        >SiteMapDataSou rce control and set its Provider property to the name of
        >your provider. Before doing so, you should register your provider in
        >the web.config file.
        >
        >Grtz,
        >
        >Wouter van Vugt
        >Trainer - Info Support
        >http://blogs.infosupport.com/wouterv[/color]

        --
        Message posted via http://www.dotnetmonster.com

        Comment

        • Wouter van Vugt

          #5
          Re: question about sitemap architecture

          Sorry, wrong link. You'd best read up here:
          Provides a common base class for all site map data providers, and a way for developers to implement custom site map data providers that can be used with the ASP.NET site map infrastructure as persistent stores for SiteMap objects.


          Basically, the architecture is as follows:

          Control(TreeVie w, Menu) --> SiteMapDataSour ce --> SiteMapProvider -->
          Data(DB, Xml...)

          The sitemapdatasour ce is a new DataSourceContr ol, which allows
          declarative databinding. It gets
          its data from a SiteMapProvider (configure in web.config), which in turn
          reads a database or XML file or something similar.

          Grtz, Wouter

          Comment

          • Andy Sutorius via DotNetMonster.com

            #6
            Re: question about sitemap architecture

            Thank you for your help!

            Wouter van Vugt wrote:[color=blue]
            >Sorry, wrong link. You'd best read up here:
            >http://msdn2.microsoft.com/en-us/lib...pprovider.aspx
            >
            >Basically, the architecture is as follows:
            >
            >Control(TreeVi ew, Menu) --> SiteMapDataSour ce --> SiteMapProvider -->
            >Data(DB, Xml...)
            >
            >The sitemapdatasour ce is a new DataSourceContr ol, which allows
            >declarative databinding. It gets
            >its data from a SiteMapProvider (configure in web.config), which in turn
            >reads a database or XML file or something similar.
            >
            >Grtz, Wouter[/color]

            --
            Message posted via DotNetMonster.c om

            Comment

            Working...