you cant use javascript but you can use ajax.
-------------------
Answer 2:
Use something like this:
if (FileUploadControl.HasFile)
{
double FileSize = FileUploadControl.PostedFile.ContentLength;
double VerifyFileSize = FileSize / 1024 / 1024;
bool Status = false;
if (VerifyFileSize > 1)
{
Status = true;
}
FileSizeStatusLabel.Text = FileSize.ToString() + " " + (Status ? "to big" : "size ok");
}
I mentioned Ajax to get rid of the post back. However, as I said you cant get it using client js