c# - http url for local files asp.net -


i have treeview folder under application folder. provide links files in folder. folder might have sub folders , on. how can provide http urls in links.

when physical location of file instead of http url.

path.combine(file.directoryname, file.name) 

thanks.

first root of application.

var root = server.mappath("~"); 

now, need, iterate on files/directories. can combine paths so:

foreach (var file in system.io.directory                          .getfiles(system.io.path.combine(root, "images"))) {     // give relative url of each file.     var fileurl = resolveurl(file.replace(root, string.empty).replace("\\", "/")); } 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -