Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Download function for large in memory file?

Reply
Thread Tools

Download function for large in memory file?

 
 
Adam Smith
Guest
Posts: n/a
 
      04-17-2004
Is there any way, from the user pressing a button to download to them a
string in memory? What I want to do is retrieve a large text block from
the database and send it to them as a file.

Thanks in advance.

Adam Smith

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Adam Smith
Guest
Posts: n/a
 
      04-21-2004
Found it!
private void OnItemCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
if(e.CommandName == "Download")
{

string sResult =
"<Hello>world</Hello>"l

Response.ContentType = "text/xml";
Response.AddHeader("content-disposition","attachment;
filename=\"ResultDoc.xml\"");
Response.Write(sResultXml);
Response.End();
}

}

Adam Smith <> wrote in message news:<#>...
> Is there any way, from the user pressing a button to download to them a
> string in memory? What I want to do is retrieve a large text block from
> the database and send it to them as a file.
>
> Thanks in advance.
>
> Adam Smith
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Direct Download Movies - No Download Limits - Download DivX DVDMovies hussain dandan Python 0 12-06-2009 04:52 AM
Memory loss in download of large files fixed in .NET 1.1 SP1? =?Utf-8?B?UGV0ZXJU?= ASP .Net 3 01-22-2006 09:41 AM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
[Urgent] Is there a size limit on returning a large dataset or a large typed array from web service? Ketchup ASP .Net Web Services 1 05-25-2004 10:11 AM
Backing Up Large Files..Or A Large Amount Of Files Scott D. Weber For Unuathorized Thoughts Inc. Computer Support 1 09-19-2003 07:28 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57