Solved

treenode naviateurl

Posted on 2013-02-05
4
180 Views
Last Modified: 2013-02-05
I would like to pull only the dynamic path and not the full path to my tree node Naviateurl
I tried server.mappath but get and error. example below.

Dim files As FileInfo() = thisDir.GetFiles("*.*")
For Each file As FileInfo In files
            Dim thisFileNode As New TreeNode(file.Name, Nothing, "Images/file.gif")
            thisDirNode.ChildNodes.Add(thisFileNode)
hisFileNode.NavigateUrl = file.DirectoryName.ToString + file.name
Next


('C:/inetpub/wwwroot/pdfs/State/01082013/00000/010813010206.PDF')


to

/State/01082013/00000/010813010206.PDF
0
Comment
Question by:sevensnake77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 38856701
Dim RelativePath as String = AbsolutePath.Replace(Request.ServerVariables("APPL_PHYSICAL_PATH"), String.Empty)

Then you can use the RelativePath variable.
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 38856786
error when using AbsolutePath
0
 
LVL 9

Author Closing Comment

by:sevensnake77
ID: 38857003
tks
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 38857006
AbsolutePath is the string of the file.

eg:  Http://MyServer/pdfs/State/01082013/00000/010813010206.PDF
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Where does legacy ASP.NET initialize language? 2 102
Convert VB web project to C# 3 66
Office 365: Assigning MailboxPlan to a mailbox 8 72
Can Selenium do Load Testing? 2 61
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question