473,573 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3220
"Dan" <da*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
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.saunder s at SurfControl.com > wrote in message news:<#m******* *******@TK2MSFT NGP10.phx.gbl>. ..
"Dan" <da*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
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*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
"John Saunders" <john.saunder s at SurfControl.com > wrote in message

news:<#m******* *******@TK2MSFT NGP10.phx.gbl>. ..
"Dan" <da*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
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.saunder s at SurfControl.com > wrote in message news:<#i******* *******@TK2MSFT NGP12.phx.gbl>. ..
"Dan" <da*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
"John Saunders" <john.saunder s at SurfControl.com > wrote in message

news:<#m******* *******@TK2MSFT NGP10.phx.gbl>. ..
"Dan" <da*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
> 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*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
"John Saunders" <john.saunder s at SurfControl.com > wrote in message news:<#i******* *******@TK2MSFT NGP12.phx.gbl>. ..
"Dan" <da*******@hotm ail.com> wrote in message
news:61******** *************** ***@posting.goo gle.com...
"John Saunders" <john.saunder s at SurfControl.com > wrote in message

news:<#m******* *******@TK2MSFT NGP10.phx.gbl>. ..
> "Dan" <da*******@hotm ail.com> wrote in message
> news:61******** *************** ***@posting.goo gle.com...
> > 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
4082
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 double-click on an .asp file in my file explorer and have it load in IE6. IE shows the page in the address bar, e.g. C:\Inetpub\wwwroot\myweb\math.asp
21
66785
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 are the other approaches. please advise. thanks!!
4
2041
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
1783
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 initials and user name happen to be "ept", and so I have directories with that name. It is no longer possible to browse to any subfolder and therefore...
1
1374
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 all the files to the server. plz help me to achive this functionalties in ASP.Net.
4
1888
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 run the MSI to install - looks good so far - I see the global directory, etc. I try opening the app in IE via www.myweb.com/aspxfolder; where...
5
3126
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 login to the application which we are building to 1). the user would locate their purchase request record in the application. 2). browse the...
3
11067
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
5936
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 inputs abt how to achieve this or any links are appreciated. This Link did not help me , i get an error(PERMISSION DENIED) instead , did this...
0
7750
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7989
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8182
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7744
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5271
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3708
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3708
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1271
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.