protected void gdvfile_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Download") { var a = e.CommandArgument.ToString(); string filename = a; Response.AppendHeader("Content-Disposition","attachment;filename=" + filename); string aaa = Server.MapPath("~/Upload/" + filename); Response.TransmitFile(Server.MapPath("~/Upload/" + filename)); Response.End(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)