Hi,
Here is good example if you want to force a download programmatically. :-)
private void Page_Load(object sender, System.EventArgs e){
string FileName;
string FExt;
FileName = Request["f"];
FExt = FileName.Substring(FileName.IndexOf(".") + 1);
if (FileName == ""){
Response.Write("No file was specified");
Response.End();
}
Response.ContentType = "application/" + FExt;
Response.AddHeader("content-disposition", "attachment; filename=" + FileName.Substring(FileName.LastIndexOf("\\")));
string FilePath = FileName;
Response.WriteFile(FilePath);
Response.End();
}
Regards
---------------------------------------------------------------------
http://www.AllAmericanJobs.net
Job search from your desktop and automatically sends your resume.
---------------------------------------------------------------------