EDIT:
Looking at your comment, I think you mean clicking on the response flow instead?
protected void lnbDownloadFile_Click(object sender, EventArgs e) { String YourFilepath; System.IO.FileInfo file = new System.IO.FileInfo(YourFilepath); // full file path on disk Response.ClearContent(); // neded to clear previous (if any) written content Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = "text/plain"; Response.TransmitFile(file.FullName); Response.End(); }
This should display a dialog box in the browser, allowing the user to choose where to save the file.
Do you want to use the FileUpload control
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx
protected void UploadButton_Click(object sender, EventArgs e) {
hearn
source share