protected void lnkdownload_Click(object sender, EventArgs e) { Response.Clear(); LinkButton l1 = (LinkButton)sender; string filenm = l1.CommandArgument; Response.ContentType = ContentType; Response.AddHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileName(filenm) + "\""); Response.Charset = ""; Response.WriteFile(filenm); Response.End(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)