Browse to Folder instead of Folder + File

Discussion in 'ASP .Net' started by Dan, Nov 17, 2003.

  1. Dan

    Dan Guest

    I am working on a C# ASP.NET project where I need to allow the user to
    browse to a folder. The only way I see how to do this is use <input
    type=file>. But this makes the user select a file and returns folder
    + filename. I only want the folder path.

    Does someone have a possible solution other than <input type=file>?
     
    Dan, Nov 17, 2003
    #1
    1. Advertising

  2. "Dan" <> wrote in message
    news:...
    > I am working on a C# ASP.NET project where I need to allow the user to
    > browse to a folder. The only way I see how to do this is use <input
    > type=file>. But this makes the user select a file and returns folder
    > + filename. I only want the folder path.
    >
    > Does someone have a possible solution other than <input type=file>?


    What do you mean, "browse to a folder?" What would the user see when he got
    there?
    --
    John Saunders
    John.Saunders at SurfControl.com
     
    John Saunders, Nov 17, 2003
    #2
    1. Advertising

  3. Dan

    Dan Guest

    "John Saunders" <john.saunders at SurfControl.com> wrote in message news:<#>...
    > "Dan" <> wrote in message
    > news:...
    > > I am working on a C# ASP.NET project where I need to allow the user to
    > > browse to a folder. The only way I see how to do this is use <input
    > > type=file>. But this makes the user select a file and returns folder
    > > + filename. I only want the folder path.
    > >
    > > Does someone have a possible solution other than <input type=file>?

    >
    > What do you mean, "browse to a folder?" What would the user see when he got
    > there?


    When I use <input type=file> it allows the user to browse their hard
    drive and return a path to the selected filename. I want to allow the
    user to select a folder rather than file and return only the folder
    path.
     
    Dan, Nov 18, 2003
    #3
  4. "Dan" <> wrote in message
    news:...
    > "John Saunders" <john.saunders at SurfControl.com> wrote in message

    news:<#>...
    > > "Dan" <> wrote in message
    > > news:...
    > > > I am working on a C# ASP.NET project where I need to allow the user to
    > > > browse to a folder. The only way I see how to do this is use <input
    > > > type=file>. But this makes the user select a file and returns folder
    > > > + filename. I only want the folder path.
    > > >
    > > > Does someone have a possible solution other than <input type=file>?

    > >
    > > What do you mean, "browse to a folder?" What would the user see when he

    got
    > > there?

    >
    > When I use <input type=file> it allows the user to browse their hard
    > drive and return a path to the selected filename. I want to allow the
    > user to select a folder rather than file and return only the folder
    > path.


    <input type=file> doesn't just return the path, it returns the entire file.
    --
    John Saunders
    John.Saunders at SurfControl.com
     
    John Saunders, Nov 18, 2003
    #4
  5. Dan

    Dan Guest

    "John Saunders" <john.saunders at SurfControl.com> wrote in message news:<#iCRq$>...
    > "Dan" <> wrote in message
    > news:...
    > > "John Saunders" <john.saunders at SurfControl.com> wrote in message

    > news:<#>...
    > > > "Dan" <> wrote in message
    > > > news:...
    > > > > I am working on a C# ASP.NET project where I need to allow the user to
    > > > > browse to a folder. The only way I see how to do this is use <input
    > > > > type=file>. But this makes the user select a file and returns folder
    > > > > + filename. I only want the folder path.
    > > > >
    > > > > Does someone have a possible solution other than <input type=file>?
    > > >
    > > > What do you mean, "browse to a folder?" What would the user see when he

    > got
    > > > there?

    > >
    > > When I use <input type=file> it allows the user to browse their hard
    > > drive and return a path to the selected filename. I want to allow the
    > > user to select a folder rather than file and return only the folder
    > > path.

    >
    > <input type=file> doesn't just return the path, it returns the entire file.


    Thanks John, but it actually returns both.

    c:\blather\blah\bleep.txt

    path = c:\blather\blah
    file = bleep.txt.

    <input type=file> will return path + file. Now that we have that
    straightened out. I want something that returns ONLY path. And the
    dialog box only allows the user to select a folder, not file.

    I am using this so I can ask a user what folder has the files I want
    to do things to.
     
    Dan, Nov 20, 2003
    #5
  6. "Dan" <> wrote in message
    news:...
    > "John Saunders" <john.saunders at SurfControl.com> wrote in message

    news:<#iCRq$>...
    > > "Dan" <> wrote in message
    > > news:...
    > > > "John Saunders" <john.saunders at SurfControl.com> wrote in message

    > > news:<#>...
    > > > > "Dan" <> wrote in message
    > > > > news:...
    > > > > > I am working on a C# ASP.NET project where I need to allow the

    user to
    > > > > > browse to a folder. The only way I see how to do this is use

    <input
    > > > > > type=file>. But this makes the user select a file and returns

    folder
    > > > > > + filename. I only want the folder path.
    > > > > >
    > > > > > Does someone have a possible solution other than <input

    type=file>?
    > > > >
    > > > > What do you mean, "browse to a folder?" What would the user see when

    he
    > > got
    > > > > there?
    > > >
    > > > When I use <input type=file> it allows the user to browse their hard
    > > > drive and return a path to the selected filename. I want to allow the
    > > > user to select a folder rather than file and return only the folder
    > > > path.

    > >
    > > <input type=file> doesn't just return the path, it returns the entire

    file.
    >
    > Thanks John, but it actually returns both.
    >
    > c:\blather\blah\bleep.txt
    >
    > path = c:\blather\blah
    > file = bleep.txt.
    >
    > <input type=file> will return path + file. Now that we have that
    > straightened out. I want something that returns ONLY path. And the
    > dialog box only allows the user to select a folder, not file.
    >
    > I am using this so I can ask a user what folder has the files I want
    > to do things to.


    I mean that it returns the FILE contents itself. I didn't mean that it
    returns the file.typ part of a filespec.

    See
    http://msdn.microsoft.com/library/d...mwebuihtmlcontrolshtmlinputfileclasstopic.asp.
    --
    John Saunders
    John.Saunders at SurfControl.com
     
    John Saunders, Nov 22, 2003
    #6
  7. Dan

    shobhaiyer

    Joined:
    Oct 3, 2007
    Messages:
    2
    Browse to Folder instead of Folder + File Reply to Thread

    Did you find a solution to this. I am working currently on a asp.net project where I need to get the folder name only and NOT FILE name....

    Please let me know if you wer able to find a solution for this.

    Shobha


     
    shobhaiyer, Mar 19, 2010
    #7
  8. Dan

    catherine sea

    Joined:
    Jun 30, 2009
    Messages:
    4
    I want to know how to do this too....
     
    catherine sea, Oct 28, 2010
    #8
    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. Mike John
    Replies:
    0
    Views:
    538
    Mike John
    Jul 28, 2003
  2. VB Joshua

    Browse for folder dialog

    VB Joshua, Sep 2, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    682
    Rutger Smit
    Sep 3, 2004
  3. =?Utf-8?B?TWlrZSBNb29yZQ==?=

    Browse For Folder

    =?Utf-8?B?TWlrZSBNb29yZQ==?=, Aug 16, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    6,329
  4. Replies:
    1
    Views:
    826
    Mark Rae
    Feb 26, 2006
  5. Replies:
    0
    Views:
    244
Loading...

Share This Page