P
Phil
Hello...
I have a treeview that looks something like:
Root
.....Folder1
.........FolderA
.............Page
.........FolderB
.............Page
.....Folder2
.........FolderA
.............Page
.........FolderB
.............Page
When a user clicks on a "Page" node, I need to save the name of the page clicked and redirect to another .aspx. However, if a user clicks on a "Folder" node, I want nothing to happen. So, in my code behind file, I have:
private void idTreeViewreports_SelectedIndexChange(object sender, Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs e)
{
[I need help here... How to get the name of the of the selected node.]
Response.Redirect("reportsDateSelection.aspx");
}
The problem with this code is that clicking a folder node also causes a redirect. I only want to do this if a page node is clicked.
Is this the best way to do this? If so, how do I code it so that I only get page node clicks, not folder nodes?
If there's a better way of doing this, I'm all ears.
Thanks.
I have a treeview that looks something like:
Root
.....Folder1
.........FolderA
.............Page
.........FolderB
.............Page
.....Folder2
.........FolderA
.............Page
.........FolderB
.............Page
When a user clicks on a "Page" node, I need to save the name of the page clicked and redirect to another .aspx. However, if a user clicks on a "Folder" node, I want nothing to happen. So, in my code behind file, I have:
private void idTreeViewreports_SelectedIndexChange(object sender, Microsoft.Web.UI.WebControls.TreeViewSelectEventArgs e)
{
[I need help here... How to get the name of the of the selected node.]
Response.Redirect("reportsDateSelection.aspx");
}
The problem with this code is that clicking a folder node also causes a redirect. I only want to do this if a page node is clicked.
Is this the best way to do this? If so, how do I code it so that I only get page node clicks, not folder nodes?
If there's a better way of doing this, I'm all ears.
Thanks.