Different sitemap for different user

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nitin Walke
    New Member
    • Jul 2007
    • 8

    Different sitemap for different user

    Hi there,
    I am using sqlsitemap provider for showing tree. i am using tree view control.I have to show different tree for different user. so for that I have to use different sitemap.
    I think if I create inmemory sitemap file for each user and use it.
    How can I create inmemory sitemap file? or How can I solve this problem?

    I am new for .Net. Please help....
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Sounds like your homework assignment. What have you done so far?

    MODERATOR

    Comment

    • Nitin Walke
      New Member
      • Jul 2007
      • 8

      #3
      Originally posted by kenobewan
      Sounds like your homework assignment. What have you done so far?

      MODERATOR
      Now my system is working for one user. right now I am fetching data from database and store in a user.sitemap file. So treeview reads user.sitemap and create tree.
      This file is physically located on disk.
      Now, for different user tree is different.If more than two user login so how can I maintain user.sitemap file so each user can see different tree.How can I maintain user.sitemap ?

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Well I don't know why you write it to disk, but you could save it as user<SessionID> .sitemap ?

        Comment

        • Nitin Walke
          New Member
          • Jul 2007
          • 8

          #5
          But there would be multiple user and each user have huge data , si I can't store data in session.
          I am interesting in to create in memory user.sitemap file so each user can access it. but asp treeview control checks file is present while running the project. How can I achive this?

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            If the file is createsd "in memory" it's the same as using the session.
            If you want to write the file to disk, append a unique string to it's filename. I recomended using the SessionID, since they're unique and already associated with the user.

            Comment

            • Nitin Walke
              New Member
              • Jul 2007
              • 8

              #7
              Ok, suppose file is created in session but, treeview control is reffering physical user.sitemap file path. what should I do?

              <div id="SampleTreeV iew">
              <div id="Sample-Control">
              <asp:TreeView ID="TreeView1" runat="server" DataSourceID="E xampleSiteMapDS " SkinID="SampleT reeView" CssSelectorClas s="PrettyTree " />
              </div>
              <asp:SiteMapDat aSource runat="server" ID="ExampleSite MapDS" SiteMapProvider ="ExampleSiteMa pProvider1" ShowStartingNod e="false" />
              </div>


              and in web.config physical file path is provided using 'ExampleSiteMap Provider1'..

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                I keep telling you that you don't NEED to create it in the session if you want to keep them as files, just change the filenames so they are unique to the user.

                Comment

                • Nitin Walke
                  New Member
                  • Jul 2007
                  • 8

                  #9
                  But if I create different file for different user then there would be multiple file for user on disk.
                  then this application would be heavy. That's why I am trying to use inmemory file. so that after expire of session that file will be removed..

                  In web.config i am giving file name for treeview . for multiple user, how can I do this?
                  dynamically how can I do?

                  Comment

                  • Plater
                    Recognized Expert Expert
                    • Apr 2007
                    • 7872

                    #10
                    Well if you want to use "in memory file", just put it in a sesssion object. Problem solved.

                    Comment

                    Working...