Quantcast
Channel: FlexiCoder Blog » .Net code
Viewing all articles
Browse latest Browse all 10

Specify file name for file from handler

$
0
0

When returning content to a user from a generic handler use the the AddHeader method to specify the filename

context.Response.ContentType = "text/comma-separated-values";
context.Response.AddHeader("content-disposition", "attachment; filename=PrinterDirect.CSV");


Viewing all articles
Browse latest Browse all 10

Trending Articles