B
Bob Weiner
Can I control the name of a file downloaded if that file name isn't in a
request header?
I have a data grid that contains a list of excel files by date. In each row
there is a ButtonColumn pointed at a handler containing the code:
case "Download":
Response.ContentType = "Application/x-msexcel";
Response.TransmitFile(e.Item.Cells[0].Text);
Response.End();
break;
It works, but the filename offered to the client is always the name of the
aspx file with the extension replaced with .xls. Can I make the name of the
xls file offered to the client the same as it is on the server?
It seems like it should be simple enough to do but I've been searching for
the correct method, property, header without success.
Thanks,
bob
request header?
I have a data grid that contains a list of excel files by date. In each row
there is a ButtonColumn pointed at a handler containing the code:
case "Download":
Response.ContentType = "Application/x-msexcel";
Response.TransmitFile(e.Item.Cells[0].Text);
Response.End();
break;
It works, but the filename offered to the client is always the name of the
aspx file with the extension replaced with .xls. Can I make the name of the
xls file offered to the client the same as it is on the server?
It seems like it should be simple enough to do but I've been searching for
the correct method, property, header without success.
Thanks,
bob