Click here to Skip to main content
15,913,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i validate that image being uploaded in asp.net file upload control must be less than 700 kb . without web.config method .or if from web .config method ,please give error handler.thanx
Posted
Comments
Rajesh Anuhya 2-Feb-12 9:11am    
what is error handler??

1 solution

Image size.

before uploading to the server

you can't.

After upload to the server

FileInfo fno = new FileInfo("c:\\test.txt");
                        //length in bytes
                        long bytes = fno.Length; 


Thanks
--RA
 
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