There are times you need uses to open files on browser rather than to download and save them to the disk. To do this we need to specify HTTP header(Content-Deposition)
To enforce download dialog,
Response.AddHeader("Content-Disposition", "attachment; filename=" + fn);To open on browser,
Response.AddHeader("Content-Disposition", "inline; filename=" + fn);
沒有留言:
張貼留言