Sign in to follow this  

[web] ASP open network folder

This topic is 4375 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am making an ASP application that has a button that will open a network folder. The person using the application is assigned with permission to view the network folder. lets say the network path is //network/path/destfolder. When the user clicks the button a new window should just open with the path to the network folder where the documents are //network/path/destfolder The problem I am having as new to ASP is thinks like shell() wont work for me. Do I have to use javascript or something? Is VB onclick for the button capable of opening this location for me in a new window? How syntactically should I proceed? Thanks

Share this post


Link to post
Share on other sites
I think you are somewhat confused about how ASP works.

Active Server Pages runs on the web server. It can't "open a folder" on the client side. This would only be possible if the client OS were to cooperate - which it is unlikely to for security reasons.

Active Server Pages can only access files on the server side - and it can't make them appear as local files to the client. You can only do what the client lets you.

Mark

Share this post


Link to post
Share on other sites
No. Not if you are trying to do what markr thinks you are trying to do, though your original post is filled with ambiguity - *whose* network is this folder on? Does the users *local* account have access to this folder, or is it a server side account that has access to it?

Also, you are not terribly clear when you say "a new window should just open with the path to the network folder". That could mean a window with a piece of text that says "//network/path/destfolder", it could mean an explorer window (you seem unfamiliar with the distinction between browser and OS), or it could be some server provided view of the share.

Share this post


Link to post
Share on other sites
Sorry. The user can type the \\networkpath\\folder\05SS url in explorer and go to the folder. They have permission to view it. I want them to click a "open folder" button on the asp web application and it will open a new window internet explorer with the location "\\networkpath\\folder\05SS". I am using a javascript function right now and it opens a new IE window ,but it messes up the location right now and i cant figure out why.
it keeps changing to this

http://localhost/folder/SS

I hope that explains it a little better.


Private Sub btnFOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFOpen.Click
Dim url As String = "\\networkpath\\folder\05SS"
Response.Write("<SCRIPT LANGUAGE=""javascript"">window.open('" & url & "','', 'width=850, height=260, left=200, top=200, location=yes')</SCRIPT> ")
End Sub

Share this post


Link to post
Share on other sites
You need to learn javascript (or C, or C++, or any language that has standard \ string escape codes) to understand why this is happening. As a side note, using \ slashes is very platform specific. Even look at what IE does to the URL - it converts them to internet standard / slashes.

Share this post


Link to post
Share on other sites

This topic is 4375 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this