473,320 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 3194
"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 these worked in the past. One is I can't...
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 any syntax for that. If not, please advise what...
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 text box so it can be added to a list box.
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 of the path? It worked fine in Vc 6.x. My...
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 just loop through files in that folder and upload...
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 test server running Win2003Server Web Edition. I...
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 document on their server, then they would need to...
3
by: Highlander | last post by:
Hello all. Consider the following HTA: <HTML> <HEAD> <TITLE></TITLE></HEAD> <BODY> <SCRIPT LANGUAGE="VBScript"> Sub ButBrowse_onclick() '-- show browse window and Get file path:
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 requirement i think Javascript needs to be used. Any...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.