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!