Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. MS IE Treeview Problem

MS IE Treeview Problem

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdesignhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MicSky
    wrote on last edited by
    #1

    Hi, I loaded a Microsoft.Web.UI.WebControl Treeview in my ASP.Net page programmatically from a dataset. The treeview is in a form of a parent and child thing where the child is click and the page will then redirect to another page. The problem is, after loading the treeview, and after click one of the child to redirect to the next page, and when the new next page loads, the treeview seem to have collapse to its original form... How do I maintained the expanded treeview if I were to travel from page to page...? ~MicSky~

    L 1 Reply Last reply
    0
    • M MicSky

      Hi, I loaded a Microsoft.Web.UI.WebControl Treeview in my ASP.Net page programmatically from a dataset. The treeview is in a form of a parent and child thing where the child is click and the page will then redirect to another page. The problem is, after loading the treeview, and after click one of the child to redirect to the next page, and when the new next page loads, the treeview seem to have collapse to its original form... How do I maintained the expanded treeview if I were to travel from page to page...? ~MicSky~

      L Offline
      L Offline
      Lemmsjid
      wrote on last edited by
      #2

      MicSky, The TreeView has no wait of remembering its state between pages. To get around this, I would add a parameter to the URL in your redirect called something like "nodeID". Then, pass a value that you can later use to identify which node the user clicked on. Then, write a function in your pages' base class (or elsewhere) that can open the TreeView to a particular node based on that value. Then, when the user clicks on the page, instead of redirecting them to "MyPage.aspx", the redirection will be "MyPage.aspx?nodeID=4". When MyPage.aspx loads, it will get the "nodeID" and open the TreeView to Node 4. There are other ways to do it, but this way is probably the most efficient because you never need to use the Session object. Chris

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups