Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Broken Link (http://www.velocityreviews.com/forums/t619712-broken-link.html)

Mel 06-11-2008 06:31 PM

Broken Link
 
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

Peter Bromberg [C# MVP] 06-12-2008 12:31 AM

Re: Broken Link
 
For this you would need to use the FILE:/// moniker, not "Http://
--Peter
"Mel" <MLightsOut@gmail.com> wrote in message
news:f7712a87-7a4a-4590-8a00-4c4f1e08ae24@34g2000hsh.googlegroups.com...
> 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



Mel 06-12-2008 06:06 PM

Re: Broken Link
 
On Jun 11, 7:31 pm, "Peter Bromberg [C# MVP]"
<pbromb...@nospammaam.yahoo.com> wrote:
> For this you would need to use the FILE:/// moniker, not "Http://
> --Peter"Mel" <MLights...@gmail.com> wrote in message
>
> news:f7712a87-7a4a-4590-8a00-4c4f1e08ae24@34g2000hsh.googlegroups.com...
>
> > 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


Okay thanks. I had the IT guy create a virtual directory on the
server. Your idea is better though, I'll check it out.

Mel 06-12-2008 08:52 PM

Re: Broken Link
 
On Jun 11, 7:31 pm, "Peter Bromberg [C# MVP]"
<pbromb...@nospammaam.yahoo.com> wrote:
> For this you would need to use the FILE:/// moniker, not "Http://
> --Peter"Mel" <MLights...@gmail.com> wrote in message
>
> news:f7712a87-7a4a-4590-8a00-4c4f1e08ae24@34g2000hsh.googlegroups.com...
>
> > 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


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

Mel 06-13-2008 02:00 PM

Re: Broken Link
 
On Jun 12, 3:52 pm, Mel <MLights...@gmail.com> wrote:
> On Jun 11, 7:31 pm, "Peter Bromberg [C# MVP]"
>
> <pbromb...@nospammaam.yahoo.com> wrote:
> > For this you would need to use the FILE:/// moniker, not "Http://
> > --Peter"Mel" <MLights...@gmail.com> wrote in message

>
> >news:f7712a87-7a4a-4590-8a00-4c4f1e08ae24@34g2000hsh.googlegroups.com...

>
> > > 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

>
> 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.


All times are GMT. The time now is 10:33 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.