Main Page | Report this Page
.NET DotNet Forum Index  »  ASP.NET Forum  »  Save File Dialog...
Page 1 of 1    

Save File Dialog...

Author Message
tfs
Posted: Fri Oct 30, 2009 11:20 pm
Joined: 26 Jun 2004 Posts: 281
I have a file that I am creating to save my GridView information in a CSV
file to the users computer if they press my Export button.

I am not Downloading or uploading a file just streaming the data
(StreamWriter) to whereever the user wantgs to put this CSV file.

I need to be able to bring up a Save As dialog windows to allow them to tell
me where to create the file.

How would I do this?

I am seeing all kinds of information on the web for using SaveFileDialog,
but it doesn't work in my program.

SaveFileDialog save = new SaveFileDialog();

What do I need to do to get this to work?

Thanks,

Tom
 
tfs
Posted: Sun Nov 01, 2009 3:10 pm
Joined: 26 Jun 2004 Posts: 281
"Mark Rae [MVP]" <mark at (no spam) markNOSPAMrae.net> wrote in message
news:OeevYRnWKHA.4780 at (no spam) TK2MSFTNGP05.phx.gbl...
Quote:
"tshad" <tfs at (no spam) dslextreme.com> wrote in message
news:ePw9dZlWKHA.3876 at (no spam) TK2MSFTNGP05.phx.gbl...

http://tinyurl.com/yb4phgq

But as you say this is showing me how to use SaveFileDialog from a
windows app.

Er, no it's not... Every page returned by the above Google search is
related to ASP.NET - that's why the first element in the search string is
ASP.NET...

Are you saying there is no way for me to get the information the user
needs (csv) to put on their machine from a web page?

Exporting the contents of a GridView to a .csv file is simple enough -
there are literally dozens (maybe hundreds) of examples available:
http://tinyurl.com/ygxvuh5


Already had the exporting part working fine.


My problem (as you know) was getting it to a share and getting a
SaveFileDialog to work.

I solved the SaveFileDialog by setting up a link to the file and allowing
the browser to handle save or execute.

Thanks,

Tom

Quote:
--
Mark Rae
ASP.NET MVP
http://www.markrae.net
 
Mark Rae [MVP]...
Posted: Sun Nov 01, 2009 3:24 pm
Guest
"tshad" <tfs at (no spam) dslextreme.com> wrote in message
news:%230Rkm9yWKHA.3876 at (no spam) TK2MSFTNGP05.phx.gbl...

Quote:
Exporting the contents of a GridView to a .csv file is simple enough -
there are literally dozens (maybe hundreds) of examples available:
http://tinyurl.com/ygxvuh5

Already had the exporting part working fine.

My problem (as you know) was getting it to a share and getting a
SaveFileDialog to work.

I solved the SaveFileDialog by setting up a link to the file and allowing
the browser to handle save or execute.

I'm curious... Do you simply want to stream the contents of a GridView down
to the client browser? If so, what is the purpose of saving the contents to
a physical file first...?



--
Mark Rae
ASP.NET MVP
http://www.markrae.net
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Wed Dec 02, 2009 4:17 pm