Browse Local Drives from Webpage

Discussion in 'ASP .Net' started by Wardeaux, Nov 3, 2004.

  1. Wardeaux

    Wardeaux Guest

    Hey all,
    need sample/article how to let user browse local drives to select a file
    and have the local drive location returned so I can store it in my db,
    similar to a file upload but without the actual file transfer and I need the
    full path...
    any assist is greatly appreciated!!
    MTIA
    wardeaux
     
    Wardeaux, Nov 3, 2004
    #1
    1. Advertising

  2. You could just use a FileUpload control, but don't actually upload the file.
    It should give you the full local path.

    "Wardeaux" wrote:

    > Hey all,
    > need sample/article how to let user browse local drives to select a file
    > and have the local drive location returned so I can store it in my db,
    > similar to a file upload but without the actual file transfer and I need the
    > full path...
    > any assist is greatly appreciated!!
    > MTIA
    > wardeaux
    >
    >
    >
     
    =?Utf-8?B?SGFhY2tlZA==?=, Nov 3, 2004
    #2
    1. Advertising

  3. Wardeaux

    Wardeaux Guest

    any suggestions on a good one?

    "Haacked" <> wrote in message
    news:...
    > You could just use a FileUpload control, but don't actually upload the

    file.
    > It should give you the full local path.
    >
    > "Wardeaux" wrote:
    >
    > > Hey all,
    > > need sample/article how to let user browse local drives to select a

    file
    > > and have the local drive location returned so I can store it in my db,
    > > similar to a file upload but without the actual file transfer and I need

    the
    > > full path...
    > > any assist is greatly appreciated!!
    > > MTIA
    > > wardeaux
    > >
    > >
    > >
     
    Wardeaux, Nov 3, 2004
    #3
  4. You can use a HTML file input control.

    <input id="inputfile" style="DISPLAY: none" type="file" name="browser"
    runat="server">

    Set it up to run at server.

    Declare the control as part of page class.

    protected System.Web.UI.HtmlControls.HtmlInputFile inputfile;

    Then you can use the System.IO namespace to access the file system and the
    Browser object to get the filename.

    example: string extension =
    System.IO.Path.GetExtension(Browser.PostedFile.FileName);

    Enrique.

    "Wardeaux" <> wrote in message
    news:ud9uN$...
    > Hey all,
    > need sample/article how to let user browse local drives to select a file
    > and have the local drive location returned so I can store it in my db,
    > similar to a file upload but without the actual file transfer and I need
    > the
    > full path...
    > any assist is greatly appreciated!!
    > MTIA
    > wardeaux
    >
    >
     
    Enrique Santa Cruz, Nov 4, 2004
    #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?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=

    Enumerate all the drives including Mapped network drives on a serv

    =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=, Feb 25, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,058
    =?Utf-8?B?UHJhZGVlcCBTdW5kYXJhbShNU0ZUKQ==?=
    Feb 26, 2005
  2. sumit
    Replies:
    3
    Views:
    284
  3. Replies:
    2
    Views:
    8,817
    Jeffrey Schwab
    May 15, 2006
  4. soren625
    Replies:
    2
    Views:
    406
    soren625
    Dec 12, 2006
  5. Replies:
    0
    Views:
    243
Loading...

Share This Page