This question is locked. New answers and comments are not allowed.
Right now, I'm trying to write a web page that has two major items: a TreeView and an Upload. The idea is that the TreeView represents a file structure on the hard drive (I got that working fine), and the Upload lets you upload files somewhere into that structure. The way I intend to let the user control where the uploaded files go is to somehow let the Upload know what node in the TreeView is currently selected.
What I'd like to do is pass the value of the currently selected node (which holds the full directory path that that node represents as a string) in as a route value in the Upload's Save() call. The only problem is that I don't know how to access the TreeView's nodes from within the definition of the route values. So basically, what would I put in place of the question marks in this snippet:
I know that in javascript I can just do
where "fileViewer" is the name of the TreeView. So I guess another way to look at the question is: what's the razor equivalent of that?
I'm working with all the latest stable versions of ASP.Net, MVC, and Telerik, and I'm working in C#.
What I'd like to do is pass the value of the currently selected node (which holds the full directory path that that node represents as a string) in as a route value in the Upload's Save() call. The only problem is that I don't know how to access the TreeView's nodes from within the definition of the route values. So basically, what would I put in place of the question marks in this snippet:
@(Html.Telerik().Upload() .Name("files") .Multiple(true) .Async(async => async .Save("Save", "File", new { @destinationDirectory = ???????}) .Remove("Remove", "File") .AutoUpload(true) ))I know that in javascript I can just do
$('#fileViewer').data("tTreeView").getItemValue(e.item);where "fileViewer" is the name of the TreeView. So I guess another way to look at the question is: what's the razor equivalent of that?
I'm working with all the latest stable versions of ASP.Net, MVC, and Telerik, and I'm working in C#.