I have implemented Web file manager in my application. It shows the files from the FTP server.
When i try to download the file by clicking on the file i'm getting the following error.
Getting the error during WriteFile
line getting executed.
Error:
Could not find file 'C:\Users\ ####\Desktop\SeekDotNetFileManager\AdminMaster.master.cs'.
//Code:
Response.AddHeader("Content-Disposition", "attachment; filename=" + lnkName.Text.Trim());
Response.WriteFile(lnkName.Text);
Response.End();
In the lnkName.Text.Trim
the name of the file will be set.
Eg: AdminMaster.master.cs
Where i'm wrong?
Got a Solution:
//Code