Rename File

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
 
M

Michael Nemtsev [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top