Browse For Folder

G

Guest

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 directory for the newly created document
3). find it
4). they would click a save button - this would save the actual directory
path to where the document resides on the server.

all newly created documents or modifications would be performed outside the
application.

Does anyone have any suggestions or sample code?
 
K

Kevin Spencer

Javva applet or ActiveX control. This sort of functionality is not natively
available in a Web Browser.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Paranoia is just a state of mind.
 
G

Guest

I have seen similar functionality in Share point portals.. it supports
folder view just as windows explorer... but the Share point would be suitable
only for intranet applications i guess.
 
D

David Lloyd

Mike:

Although Java or an ActiveX control would address this issue, another way to
implement this would be to use an file upload input on your web page (i.e.
<input type=file>. This gives you the browse capability, however with the
tradeoff that if you just submit the page without doing anything, the actual
file will be uploaded to the server. My understanding is that you just want
the path and not the actual file.

To work around this caveat, you could have a jscript (javascript) function
on the page which would handle the Save button click event. In this event
handler, you could assign the chosen file to a hidden field and then clear
the value of the file input textbox so that no file transfer takes place
when you submit the web page. You can then capture the value of the hidden
field and stored the value in your database. You may want to use the
System.IO namespace to check the validity of the file submitted. Below is a
simple web page which implements this functionality.


<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<script lang="jscript">
function submitForm()
{
<!--You may want to check the myfile variable for a value-->
var filename = document.Form1.myfile.value;
document.Form1.myhiddenfield.value = filename;
document.Form1.myfile.value = "";
document.Form1.submit();
}
</script>
</HEAD>
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server"
enctype="multipart/form-data">
<P><INPUT type="file" name="myfile"></P>
<P><INPUT type="button" value="Submit" name="mysubmit"
onClick="submitForm()"></P>
<P><INPUT type="hidden" name="myhiddenfield"></P>
</form>
</body>
</HTML>

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


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 directory for the newly created document
3). find it
4). they would click a save button - this would save the actual directory
path to where the document resides on the server.

all newly created documents or modifications would be performed outside the
application.

Does anyone have any suggestions or sample code?
 
G

Guest

Hi,

Would you be able to provide me with the links?
So that I can view the samples.

Thanks.
 
S

sreejith.ram

Siew,

The examples I have seen are intranet sites using sharepoint portal..
I dont think you will be able to find an internet sample.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top