[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Open Folder Location or File on a button click

Posted on 2010-11-17
2
Medium Priority
?
626 Views
Last Modified: 2012-05-10
Hello Experts,

I have a webform that's hosted on our webserver.  The web form allows the user to save out files to a folder that lives in the directory where the application is hosted.  This is all working.

What I need is:
A button with the ability to open Windows explorer to the location of the folder.
A button with the ability to open a particular file in that folder.  (It's a word file)

I'd really need server-side code for this, and would prefer to use a button over a hyperlink.

Thanks!
Moe
0
Comment
Question by:mauricerichard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
JosephEricDavis earned 2000 total points
ID: 34159032
Windows explorer will not be able to have access to a file that lives on your web server.  However, you can set up your web server so that a specific directory can be configured with directory browsing.  Then when the user clicks on this button of yours that is supposed to open up the folder you can just forward them to the url of your directory on your webserver, or open up that url in a new window.

To have the other button open up a word file that exists on the server you could have the button click event in the server side code override your http response so that instead of sending an html document in response to the request it will send down the word document.  The user would then be prompted if they want to save or open the file as you often do when you download a file from the internet.

Here are a couple of examples on how to do this...

http://www.west-wind.com/weblog/posts/76293.aspx

http://dotnetslackers.com/Community/blogs/haissam/archive/2007/04/03/Downloading-Files-C_2300_.aspx
0
 
LVL 1

Author Closing Comment

by:mauricerichard
ID: 34187500
Thanks for the info!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question