Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > file open with web app

Reply
Thread Tools

file open with web app

 
 
Paul
Guest
Posts: n/a
 
      06-06-2008
Hi I am able to upload files to a server with a .net web application. The
problem is I am providing a hyperlink so the user can open the file after it
is placed on the server. For the URL I am using the absolute path to the
file and setting this dynamically after the file is uploaded. For the
hyperlink I have the target set to _blank. When clicking on the hyperlink
nothing happens, wondering if I need to use a file open control and if there
is one with .net 2005?
thanks!
--
Paul G
Software engineer.
 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      06-06-2008
I located the open file dialog in the toolbox but it is not enabled.
Wondering if this control only works for windows apps!--
Paul G
Software engineer.


"Paul" wrote:

> Hi I am able to upload files to a server with a .net web application. The
> problem is I am providing a hyperlink so the user can open the file after it
> is placed on the server. For the URL I am using the absolute path to the
> file and setting this dynamically after the file is uploaded. For the
> hyperlink I have the target set to _blank. When clicking on the hyperlink
> nothing happens, wondering if I need to use a file open control and if there
> is one with .net 2005?
> thanks!
> --
> Paul G
> Software engineer.

 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      06-06-2008
thanks for the response, that seems to be the problem.
string abstpath = Server.MapPath(newpath + FileUpload1.FileName);
"C:\\folder1\\folder2\\filename"
Do you know if there is an easy way to get the path in the http format?
Guess it is possible to convert the path with the C:\\ to the correct one
with string.replace.


--
Paul G
Software engineer.


"Patrice" wrote:

> Absolute path that is ? Use "view source" to check exactlly whihc lcoation
> is used in your HTML markup. Make sure it looks like
> "http://mysite/mydir/myfile.doc" not "c:\serverdir\myfile.doc" that doesn"t
> make sense client side).
>
> For the same reason using an open dialog wouldn't make sense The client
> can't see directly the server drive.
>
> --
> Patrice
>
> "Paul" <(E-Mail Removed)> a écrit dans le message de groupe de
> discussion : http://www.velocityreviews.com/forums/(E-Mail Removed)...
> > Hi I am able to upload files to a server with a .net web application. The
> > problem is I am providing a hyperlink so the user can open the file after
> > it
> > is placed on the server. For the URL I am using the absolute path to the
> > file and setting this dynamically after the file is uploaded. For the
> > hyperlink I have the target set to _blank. When clicking on the hyperlink
> > nothing happens, wondering if I need to use a file open control and if
> > there
> > is one with .net 2005?
> > thanks!
> > --
> > Paul G
> > Software engineer.

>
>
>

 
Reply With Quote
 
Paul
Guest
Posts: n/a
 
      06-06-2008
got it working, just used ~/folder/filename.
--
Paul G
Software engineer.


"Patrice" wrote:

> Absolute path that is ? Use "view source" to check exactlly whihc lcoation
> is used in your HTML markup. Make sure it looks like
> "http://mysite/mydir/myfile.doc" not "c:\serverdir\myfile.doc" that doesn"t
> make sense client side).
>
> For the same reason using an open dialog wouldn't make sense The client
> can't see directly the server drive.
>
> --
> Patrice
>
> "Paul" <(E-Mail Removed)> a écrit dans le message de groupe de
> discussion : (E-Mail Removed)...
> > Hi I am able to upload files to a server with a .net web application. The
> > problem is I am providing a hyperlink so the user can open the file after
> > it
> > is placed on the server. For the URL I am using the absolute path to the
> > file and setting this dynamically after the file is uploaded. For the
> > hyperlink I have the target set to _blank. When clicking on the hyperlink
> > nothing happens, wondering if I need to use a file open control and if
> > there
> > is one with .net 2005?
> > thanks!
> > --
> > Paul G
> > Software engineer.

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to provide credentials to a web app from an external web app? rpfe@sapo.pt ASP .Net 1 02-09-2007 05:06 PM
convert java web app 2 .NET web app =?Utf-8?B?bml6YW0=?= ASP .Net 0 02-28-2006 04:46 AM
convert java web app 2 .NET web app =?Utf-8?B?bml6YW0=?= ASP .Net 0 02-28-2006 04:45 AM
403 Error Web App to Web App with Client Certificates Peter Sedman ASP .Net Security 18 11-18-2004 08:09 PM
How to secure one web app with another web app... Maras ASP .Net Security 0 06-17-2004 07:37 AM



Advertisments