Hi guys, I have a problem which make me headache.
Suppose I wish to download excel file from what I have browse and some logic processing.
But it returns me aspx.page content, in short a html page.
String FileName = excelApp.ActiveWorkbook+".xls";
String FilePath = input.PostedFile.FileName;
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.Clear();
response.ContentType = "application/vnd.ms-excel";
response.AddHeader("content-disposition", "excelApp.ActiveWorkbook;Filename="+FileName);
response.AddHeader("content-length", FileName.Length.ToString());
response.Charset = "";
this.EnableViewState = false;
response.TransmitFile(FileName);
response.Write(FileName);
response.Flush();
response.End();
Any Profesional can guide me? thanks in advance