1jaws
asked on
download file
I have this code below that gets the folder and the file name from directory ok... now, I need user to be able to download the file wherever they wish to download on their pc... so, what I need to do next?
string folder = Server.MapPath("/emailAtta chments/" + lblattachment.Text.ToStrin g());
string[] filePaths = Directory.GetFiles(folder) ;
string result = Path.GetFileName(filePaths [0]);
string folder = Server.MapPath("/emailAtta
string[] filePaths = Directory.GetFiles(folder)
string result = Path.GetFileName(filePaths
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
James, yours doesnt work... SriVaddadi, I got this error..
Microsoft JScript runtime error: Sys.WebForms.PageRequestMa nagerParse rErrorExce ption: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near 'PK'.
Microsoft JScript runtime error: Sys.WebForms.PageRequestMa
Details: Error parsing near 'PK'.
ASKER
I do that code inside the ItemCommand(object sender, DetailsViewCommandEventArg s e) for LinkButton clicked....
Hope you could resolve the error or let me know
Open in new window