<pre lang="c#"> int idx = strfullfilePath.LastIndexOf('\\'); string _fileName = strfullfilePath.Substring(idx + 1); //To get file name string _path = strfullfilePath.Substring(0, idx); //To get file path HttpResponse res = GetHttpResponse(); res.Clear(); res.AppendHeader("content-disposition", "attachment; filename=" + _fileName); res.ContentType = "application/octet-stream"; res.WriteFile(_path); //In this line am getting error //res.Flush(); res.End();
res.WriteFile(strfullfilePath);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)