if (filFile.HasFile) { if (string.IsNullOrEmpty(script)) { //Uploaded file is valid, now we can do whatever we like to do, copying it file system, //saving it in db etc. try { if (filFile.HasFile) { int fileSize = filFile.PostedFile.ContentLength; // if (fileSize > 1100000) if (fileSize > 1024 * 1024) { Response.Write("<script> alert ('File size exceeds form 1MB.') </script>"); //Session["uploader_Else"] = "Else"; script = string.Format(SCRIPT_TEMPLATE, "File upload FAILED.", "false"); ClientScript.RegisterStartupScript(this.GetType(), "uploadNotify", script); } else { }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)