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. |