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="imag es/FolderE xpanded.gi f"
NodeImageUrl="images/Folde r.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.Tre eView 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.
I have a treeview in my detail.aspx (which runs in a frame) like so:
<wtv:TreeView id="docTree"
runat="server" NodeCssClass="MyNode"
NodeImageUrlExpanded="imag
NodeImageUrl="images/Folde
TemplateDataBinding="false
AutoPostBack="false"></wtv
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.Tre
.....
}
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome.
ASKER