q; what is wrong with this code?

G

Guest

private void DownloadFile(string fName)
{
string msg="download done";

/*
System.IO.fInfo fInfo = new System.IO.fInfo(fName);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" +
fInfo.Name);
Response.AddHeader("Content-Length", fInfo.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(fInfo.FullName);
*/

this.myLabel.ForeColor=System.Drawing.Color.Red;
this.myLabel.Text=msg;
}

When I remove commented section, this method does not show the message in
myLabel on my page, where is the problem?
 
G

Guest

Thanks Kevin, I am trying to make sure I am getting open/save dialog box, any
solution for me?
 
G

Guest

Ok. How should I show open/save dialog box if an excel file is selected. It
will open in the browser, that is what we do not want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top