469,908 Members | 2,213 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,908 developers. It's quick & easy.

Browse to Folder instead of Folder + File

Dan
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>?
Nov 18 '05 #1
5 3032
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
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
Nov 18 '05 #2
Dan
"John Saunders" <john.saunders at SurfControl.com> wrote in message news:<#m**************@TK2MSFTNGP10.phx.gbl>...
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
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.
Nov 18 '05 #3
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
"John Saunders" <john.saunders at SurfControl.com> wrote in message

news:<#m**************@TK2MSFTNGP10.phx.gbl>...
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
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
Nov 18 '05 #4
Dan
"John Saunders" <john.saunders at SurfControl.com> wrote in message news:<#i**************@TK2MSFTNGP12.phx.gbl>...
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
"John Saunders" <john.saunders at SurfControl.com> wrote in message

news:<#m**************@TK2MSFTNGP10.phx.gbl>...
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
> 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.
Nov 18 '05 #5
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
"John Saunders" <john.saunders at SurfControl.com> wrote in message news:<#i**************@TK2MSFTNGP12.phx.gbl>...
"Dan" <da*******@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
"John Saunders" <john.saunders at SurfControl.com> wrote in message

news:<#m**************@TK2MSFTNGP10.phx.gbl>...
> "Dan" <da*******@hotmail.com> wrote in message
> news:61**************************@posting.google.c om...
> > 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/de...classtopic.asp.
--
John Saunders
John.Saunders at SurfControl.com
Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Dave N | last post: by
5 posts views Thread by Eric Twietmeyer | last post: by
4 posts views Thread by Larry Brindise | last post: by
5 posts views Thread by Mike Moore | last post: by
3 posts views Thread by Highlander | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.