3 Replies - 11213 Views - Last Post: 26 September 2012 - 05:23 AM Rate Topic: -----

#1 November-06  Icon User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 400
  • Joined: 04-January 11

Save File Dialog and Client-Side Saving

Posted 25 September 2012 - 02:08 AM

I googled for this topic and read that this is possible with Silverlight but problem is, I do not have administrator rights to install Silverlight in my desktop.

Now, I want to know if it is possible to implement a Save File Dialog or the like in ASP.NET. I am not sure of what should I use. I am thinking that maybe I could do a work around with the file upload control but I am not sure of how to proceed.

The scenario is this...

I have an export to excel button (nothing unsual since a lot of applications has this kind of functionality).

For now, I am only saving directly to the server. Problem is, the one who will be needing the file is the user in a client computer.

So I want him to be able to browse the path in which he would like to save the file and assign a filename to it. Here, I do not know what to use for the Save File Dialog Box. So this is Problem 1.

Let's assume that the client has already selected the path and assigned a filename. Now, he clicks export. Problem 2, how will I save the excel file in a client computer?

I have already finished the codes to save Excel file using Workbook and worksheets but currently, I am only able to save it in a server with a static path and filename. Any ideas on what control, language, or technology I need to use to achieve this?

This post has been edited by November-06: 25 September 2012 - 02:10 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Save File Dialog and Client-Side Saving

#2 h4nnib4l  Icon User is offline

  • The Noid
  • member icon

Reputation: 1182
  • View blog
  • Posts: 1,677
  • Joined: 24-August 11

Re: Save File Dialog and Client-Side Saving

Posted 25 September 2012 - 06:07 AM

This might help.
Was This Post Helpful? 0
  • +
  • -

#3 November-06  Icon User is offline

  • D.I.C Regular

Reputation: 46
  • View blog
  • Posts: 400
  • Joined: 04-January 11

Re: Save File Dialog and Client-Side Saving

Posted 25 September 2012 - 08:24 PM

I found a site that shows exactly what I need.

The demo project is here:
http://www.gemboxsof...asp-net-webdemo

Code behind is in:
http://www.gemboxsof...-net-webdemo-cs

Problem is I do not have the privileges to install the software.

Can I achieve the same effect without the need to install any software?

This post has been edited by November-06: 25 September 2012 - 08:44 PM

Was This Post Helpful? 0
  • +
  • -

#4 rgfirefly24  Icon User is offline

  • D.I.C Lover
  • member icon


Reputation: 284
  • View blog
  • Posts: 1,502
  • Joined: 07-April 08

Re: Save File Dialog and Client-Side Saving

Posted 26 September 2012 - 05:23 AM

you can start a download by changing the content type of the page to application/vnd.ms-excel and changing the content-disposition of the page to "attachment; filename=blah.csv".

Here is a link that will explain how to do it. The actual download part is at the very bottom of the page.
Download File to client

Basically this will make it so that when they click the download button they are prompted to save the file to their machine, much like sites like fileplanet and other download sites do.

This post has been edited by rgfirefly24: 26 September 2012 - 05:25 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1