I have a file upload page and I want to limit the file size to 1 MegaByte. I did this but looks like it's not correct because i have a file of 2404KB that I cant upload. CurrentLength is in Bytes
if (file.ContentLength > 1048576)
lmsg.Text = "Maximum file size is 1 MegaByte";
What value should I use?