Click here to Skip to main content
15,886,003 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
what if i want to change the file name when uploading file
Posted
Comments
Peter Leow 24-Dec-14 6:55am    
Tag your question with the appropriate technology/platform.

1 solution

Well...you just receive a stream of bytes via the FileUpload control and the original file name, so it';s entirely up to you if you use it or not. Nothing will save the data for you automatically (if nothing else it doesn't know where you want to store it) - so just specify the new name when you use the File.Save method on the byte or stream data in the FileBytes[^] or FileContent[^] property in your C# code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900