PC Review


Reply
Thread Tools Rate Thread

CSV export to new Window?

 
 
=?Utf-8?B?Tkg=?=
Guest
Posts: n/a
 
      29th Jan 2007
Hi,

I have some code that exports a gridview to csv, some of the code is below..

What I am trying to do is make the csv file open in a new IE window as I
need to refresh the current window are the file is created. I cant seem to
that while using the Response.End etc. Any ideas how to do this?

Response.ContentType = "Application/x-msexcel"
Response.AddHeader("content-disposition", "attachment; filename="""
& filename & """")

'Write the file directly to the HTTP output stream.
Response.Write(sb.ToString)

Response.End()
 
Reply With Quote
 
 
 
 
Aidy
Guest
Posts: n/a
 
      29th Jan 2007
Change the link the user clicks on and set the target to _blank;

<a href="CSV.aspx" target="_blank">

"NH" <(E-Mail Removed)> wrote in message
news:5FCC5B38-4416-43C0-84FE-(E-Mail Removed)...
> Hi,
>
> I have some code that exports a gridview to csv, some of the code is
> below..
>
> What I am trying to do is make the csv file open in a new IE window as I
> need to refresh the current window are the file is created. I cant seem to
> that while using the Response.End etc. Any ideas how to do this?
>
> Response.ContentType = "Application/x-msexcel"
> Response.AddHeader("content-disposition", "attachment; filename="""
> & filename & """")
>
> 'Write the file directly to the HTTP output stream.
> Response.Write(sb.ToString)
>
> Response.End()



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How can I export the contents of the reminder window? Bob I Microsoft Outlook Calendar 1 2nd Sep 2009 09:44 PM
RE: Export contents of Immediate Window? Barb Reinhardt Microsoft Excel Programming 0 28th Aug 2008 03:19 PM
empty import export window =?Utf-8?B?Y29yb2k=?= Microsoft Outlook Discussion 0 14th Sep 2005 11:06 PM
problem with 'export' window Tom Microsoft Access External Data 3 21st Jul 2005 06:36 AM
Export all data to a new window profiles Andrea Moro Microsoft Outlook Discussion 10 16th Jun 2005 12:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 AM.