Link to home
Start Free TrialLog in
Avatar of RichardFox
RichardFox

asked on

Web control contents not being preserved

Maybe someone can help me with this problem:

I have a treeview in my detail.aspx (which runs in a frame) like so:

<wtv:TreeView id="docTree"             
      runat="server" NodeCssClass="MyNode"
      NodeImageUrlExpanded="images/FolderExpanded.gif"
      NodeImageUrl="images/Folder.gif"
      TemplateDataBinding="false" Animate="false"
      AutoPostBack="false"></wtv:TreeView>

Most of that is irrelevant but I want to be complete. In my .cs file, it is:

      public class detail : System.Web.UI.Page
      {
            protected PowerUp.Web.UI.WebTree.TreeView docTree;
            .....
      }

In Page_Load, I build the tree and add nodes. I have logic so I only do this once, I don't want to rebuild the tree every time. When this page is reloaded, which is always by a javascript call in another page:

      var theFrame = self.frames["detail"];    
      theFrame.location = "detail.aspx";

but although the treeview displays fine the first time, on every subsequent load of the page, the treeview.Nodes.Count==0  !! I know I am missing something important here, but I can't imagine what. Once I build the tree, the nodes should be preserved, it is a server control.
ASKER CERTIFIED SOLUTION
Avatar of shovavnik
shovavnik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RichardFox
RichardFox

ASKER

That's exactly what I needed to know! You were abs. right, that IsPostBack is always false. THanks for the education.
You're welcome.