R
Rich
Hi,
I am just starting out writing code for asp.net and in particular C#
(transitioning from years of vb.net). I am using a commercial assembly in
this asp.net app (which just I inherited) and am using a treeview control
(which is named HierarchyTree) which is part of the assembly
(ComponentArt.Web.UI.TreeView). The treeview looks nice on my webform, but I
am having a problem adding event code. I added the control to a content
section <asp content1..> and some div tags and a splitter control (also from
component art). So I can't see the control in the design view of my webform
(the app also has a master page, but I added the treeview control to
Default.aspx). I was able to add nodes and text to the nodes. This is what
I am trying to display in the debug window on page load. I can step through
the code and it does go into the foreach loop. But nothing displays in the
debug window (output window). Any suggestions why this is happening? Does
the debug window work in asp.net? While I am at it, how to set up events for
this control? Usually I can double click on the event I need in the
lightening rod in the property sheet in Design view, but I can't get to that
property sheet since I can't see the control in design view - but the
treeview does show up when I run the application (also in the aspx html
source view). Any suggestions appreciated how to get this treeview control
going (events and so forth).
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Console.WriteLine("testing");
int i = 1;
foreach (ComponentArt.Web.UI.TreeViewNode tn in
HierarchyTree.Nodes)
{
Console.WriteLine(i.ToString() + ") " + tn.Text);
i++;
}
}
}
Thanks,
Rich
I am just starting out writing code for asp.net and in particular C#
(transitioning from years of vb.net). I am using a commercial assembly in
this asp.net app (which just I inherited) and am using a treeview control
(which is named HierarchyTree) which is part of the assembly
(ComponentArt.Web.UI.TreeView). The treeview looks nice on my webform, but I
am having a problem adding event code. I added the control to a content
section <asp content1..> and some div tags and a splitter control (also from
component art). So I can't see the control in the design view of my webform
(the app also has a master page, but I added the treeview control to
Default.aspx). I was able to add nodes and text to the nodes. This is what
I am trying to display in the debug window on page load. I can step through
the code and it does go into the foreach loop. But nothing displays in the
debug window (output window). Any suggestions why this is happening? Does
the debug window work in asp.net? While I am at it, how to set up events for
this control? Usually I can double click on the event I need in the
lightening rod in the property sheet in Design view, but I can't get to that
property sheet since I can't see the control in design view - but the
treeview does show up when I run the application (also in the aspx html
source view). Any suggestions appreciated how to get this treeview control
going (events and so forth).
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Console.WriteLine("testing");
int i = 1;
foreach (ComponentArt.Web.UI.TreeViewNode tn in
HierarchyTree.Nodes)
{
Console.WriteLine(i.ToString() + ") " + tn.Text);
i++;
}
}
}
Thanks,
Rich