file open with web app

Discussion in 'ASP .Net' started by Paul, Jun 6, 2008.

  1. Paul

    Paul Guest

    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.
     
    Paul, Jun 6, 2008
    #1
    1. Advertising

  2. Paul

    Paul Guest

    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.
     
    Paul, Jun 6, 2008
    #2
    1. Advertising

  3. Paul

    Paul Guest

    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" <> a écrit dans le message de groupe de
    > discussion : ...
    > > 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.

    >
    >
    >
     
    Paul, Jun 6, 2008
    #3
  4. Paul

    Paul Guest

    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" <> a écrit dans le message de groupe de
    > discussion : ...
    > > 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.

    >
    >
    >
     
    Paul, Jun 6, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bml6YW0=?=

    convert java web app 2 .NET web app

    =?Utf-8?B?bml6YW0=?=, Feb 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    401
    =?Utf-8?B?bml6YW0=?=
    Feb 28, 2006
  2. =?Utf-8?B?bml6YW0=?=

    convert java web app 2 .NET web app

    =?Utf-8?B?bml6YW0=?=, Feb 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    416
    =?Utf-8?B?bml6YW0=?=
    Feb 28, 2006
  3. Replies:
    1
    Views:
    422
    Patrice
    Feb 9, 2007
  4. Maras
    Replies:
    0
    Views:
    126
    Maras
    Jun 17, 2004
  5. Peter Sedman

    403 Error Web App to Web App with Client Certificates

    Peter Sedman, Sep 30, 2004, in forum: ASP .Net Security
    Replies:
    18
    Views:
    295
    jlento
    Nov 18, 2004
Loading...

Share This Page