Response Headers
-
Hi all, Is there a way that i can use inline and attachment at the same time in content-disposition for Response Headers? i have code like this
HttpContext.Current.Response.AddHeader("Content-disposition", "inline; filename=__aaa.pdf");
I want to open the file first in the browser and then open the dialog box for download as well. How can i do that? I tried to AddHeader again after that line of code and replaced the "inline" with "attachment", but that didn't work. Please help me. Thanks alot! -ewin :)
-
Hi all, Is there a way that i can use inline and attachment at the same time in content-disposition for Response Headers? i have code like this
HttpContext.Current.Response.AddHeader("Content-disposition", "inline; filename=__aaa.pdf");
I want to open the file first in the browser and then open the dialog box for download as well. How can i do that? I tried to AddHeader again after that line of code and replaced the "inline" with "attachment", but that didn't work. Please help me. Thanks alot! -ewin :)
Response.Clear() Response.Buffer = True Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("Content-Disposition", "attachment;filename=Report.xls") Response.Write(l_objStrBuilder.ToString) Response.Flush() Response.End() try this way is help ful or not :wtf: