Rename File

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I want to make a file available to a user for download on an ASP.NET
page.
So I need to have a button that when clicked, the file is download.
However, before the file is downloaded, I want it to be renamed so the
file name that the users gets is different that the one in the server.
The extension will be the same.

Any idea of how to do this?

Thanks,
Miguel
 
Hello shapper,

instead of putting direct link to file on webform, put the linkButton and
in the codebehind read your file as stream and send it to user
in this case u can send is with any name

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


s> Hello,
s>
s> I want to make a file available to a user for download on an ASP.NET
s> page.
s> So I need to have a button that when clicked, the file is download.
s> However, before the file is downloaded, I want it to be renamed so
s> the
s> file name that the users gets is different that the one in the
s> server.
s> The extension will be the same.
s> Any idea of how to do this?
s>
s> Thanks,
s> Migue
 
Back
Top