protected void ShowFile(string URL)
{
if (URL != null && URL.ToString().Trim() != "")
{
FileInfo fileInfo = new FileInfo(URL);
if (fileInfo.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + FileName);
Response.AddHeader("Content-Length", fileInfo.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.Flush();
Response.WriteFile(fileInfo.FullName);
Response.End();
}
}
}