472,342 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

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 3129
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mscir | last post by:
I just installed ASP after a couple of years of not using it, PWS Win 98 SE. A couple of things are throwing me, and I can't remember whether...
21
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find...
4
by: Dave N | last post by:
I want to programatically open the Access "File" "Open" browse box to search for a file. When it is selected I wnat to have it put the path in a...
5
by: Eric Twietmeyer | last post by:
Hi, Does anyone know why starting with VS.NET 2002 (and same with 2003) it is no longer possible to browse to a directory that has "ept" as part...
1
by: Ratan | last post by:
Can anybody tell me how to browse folder in ASP.Net, I know there is control for File browse but my requirement is to browse the folder and then...
4
by: Larry Brindise | last post by:
I have an asp.net application. I have used VStudio Web Deployment Project to create the MSI file. I copy the MSI file from my developer PC to my...
5
by: Mike Moore | last post by:
I need to create something very similiar to the browse folder capability. This would allow me to support the following - A user would create a...
3
by: Highlander | last post by:
Hello all. Consider the following HTA: <HTML> <HEAD> <TITLE></TITLE></HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub ButBrowse_onclick()...
3
by: backstreetboy | last post by:
It's possible to browse a single file using <input type="file"but is there a work around for browsing a complete folder as it is , i hav such a...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.