open file/document
-
hi this is the code for show the download dialog page code.it works well.but my requirement is just open.but it shows open/save/download.it takes lot of time. i need when we click on the link then open the page . plz help me to solve the problem. string filename = Path.GetFileName(filepath); Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ""); Response.Flush(); Response.WriteFile(filepath); regards venkaT venkat
-
hi this is the code for show the download dialog page code.it works well.but my requirement is just open.but it shows open/save/download.it takes lot of time. i need when we click on the link then open the page . plz help me to solve the problem. string filename = Path.GetFileName(filepath); Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + filename + ""); Response.Flush(); Response.WriteFile(filepath); regards venkaT venkat
You can't avoid this. AFAIK it is in built security. You wouldn't want any application to run on your machine when you click a link would you? This ensures you know what is behind the link you have clicked and therefor your responsibility to run. I don't believe you can turn it off.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."