View Single Post
  #30 (permalink)  
Old 08-08-2007, 06:42 AM
Venkat Venkat is offline
D-Web Master
 
Join Date: Mar 2007
Posts: 350
Venkat is on a distinguished road
Thumbs up Re: Implementation Data Controls in asp.net

Hi:
When we want to pop up download box, we have to do something like this:
protected void Page_Load(object sender, EventArgs e)
{
Response.AppendHeader("content-disposition",
"attachment; filename=" + "1.bmp");
Response.ContentType = "Application/pdf";
//Get the physical path to the file.
string FilePath = MapPath("images/1.bmp");
//Write the file directly to the HTTP content output stream.
Response.WriteFile(FilePath);
Response.End();
}
Only thing is to pass query string to that page. You can sill use <a> then.
If your problem isn't solved, please inform me.
Reply With Quote