Click here to Skip to main content
15,895,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi this is code for Upload image in asp.net !
C#
UploadImgHeder.PostedFile.SaveAs(path + UploadImgHeder.FileName);

I want Last Upload , Rename and then upload !
How do this ???
Posted
Comments
nilesh sawardekar 20-Jul-14 2:18am    
please specify what exactly you want.

1 solution

Check if the file already exists - File.Exists will do that - and rename it if it does - File.Move this time. Then do the SaveAs as on your code example.
 
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