Broken Link

  • Thread starter Thread starter Mel
  • Start date Start date
M

Mel

My link does not work. I want to create a link to a file that exists
on a different server. The path to the file is this "\\Junebug\Groups
\90000003.pdf". My web server is "10.10.1.111". How do I get this
link to work?

When I hover over the link the path looks like this:
http://10.10.1.111/\\Juno\Groups\90000003.pdf
 
For this you would need to use the FILE:/// moniker, not "Http://
--Peter
 
For this you would need to use the FILE:/// moniker, not "Http://

Okay thanks. I had the IT guy create a virtual directory on the
server. Your idea is better though, I'll check it out.
 
For this you would need to use the FILE:/// moniker, not "Http://

Okay so I created my virtual directory. Why doesn't DirectoryInfo
work (see code below)? The "Quote-Docs" is my new virtual directory
on my web server. I get an error that it could not find part of the
path and it is trying to query the C:\ drive.

If e.CommandName = "Quote #" Then
Dim currentCommand As String = e.CommandName
Dim currentRowIndex As Integer =
Int32.Parse(e.CommandArgument)
Dim strQuoteNum As String =
gvQuotes.DataKeys(currentRowIndex).Value

Dim myDir As DirectoryInfo = New DirectoryInfo("~\Quote-
Docs\" & strQuoteNum)
dgQuote.DataSource = myDir.GetFiles("*.pdf")
dgQuote.DataBind()
End If
 
Okay so I created my virtual directory. Why doesn't DirectoryInfo
work (see code below)? The "Quote-Docs" is my new virtual directory
on my web server. I get an error that it could not find part of the
path and it is trying to query the C:\ drive.

If e.CommandName = "Quote #" Then
Dim currentCommand As String = e.CommandName
Dim currentRowIndex As Integer =
Int32.Parse(e.CommandArgument)
Dim strQuoteNum As String =
gvQuotes.DataKeys(currentRowIndex).Value

Dim myDir As DirectoryInfo = New DirectoryInfo("~\Quote-
Docs\" & strQuoteNum)
dgQuote.DataSource = myDir.GetFiles("*.pdf")
dgQuote.DataBind()
End If

I got it. I just wrapped the path with Server.MapPath.
 
Back
Top