Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
How to convert the file into file size in C#. I have uploaded the file now i need to convert that into size in runtime.

Regards
Balamurugan
Posted
Comments
sahabiswarup 15-Nov-12 4:37am    
your question is not clear.
Sergey Alexandrovich Kryukov 16-Nov-12 23:01pm    
Why do you accept your own "answer"?! This is abuse!
--SA

1 solution

If you have used an FileUpload Control, then it will tell you the size automatically:
C#
int fileLen = myFileUpload.PostedFile.ContentLength;
 
Share this answer
 
Comments
[no name] 15-Nov-12 12:33pm    
Just i have uploaded the file and when it uploads during run time it should display the size as well as content.I have worked for getting the content but the file size is not getting viewed.

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