By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,488 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

Browse For Folder

P: n/a
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?
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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.

"Mike Moore" <Mi*******@discussions.microsoft.com> wrote in message
news:C8**********************************@microsof t.com...
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?

Nov 19 '05 #2

P: n/a

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.
"Mike Moore" wrote:
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?

Nov 19 '05 #3

P: n/a
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.
"Mike Moore" <Mi*******@discussions.microsoft.com> wrote in message
news:C8**********************************@microsof t.com...
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?
Nov 19 '05 #4

P: n/a
Hi,

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

Thanks.

"Sreejith Ram" wrote:

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.
"Mike Moore" wrote:
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?

Nov 19 '05 #5

P: n/a
Siew,

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

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.