I am using Web form to upload pictures in the database. I need a help. I want to check the file size before posting on the database. If the file size is more than 1MB, the message will be shown and no information will be posted on the database. And vice versa.
Check FIle Size Before Uploading
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Mohan4 reputationPosted Aug 11, 2006, 2:35 AM EDT
check the file size using
if(FileObj.ContentLength <= 1052182) // Upto 1 MB
{
// Insert into Database
}
else
{
// Display the Message.
}
Help me if i wrong.