//on this line error occure when checking on server side string fileName = Functions.ToString(fileUpload.PostedFile.FileName); ErrorMsg.Text = ""; if (fileUpload.Value != "") { pGotFile = true; pFileExt = GetExtension(fileUpload.PostedFile.FileName).ToLower(); pFilePost = fileUpload.PostedFile; if (pFileExt == ".pdf") { Ind = true; } if (!Ind) { args.IsValid = false; ErrorMsg.Text = "The file format you specified is not supported"; return; } if (fileUpload.PostedFile.ContentLength >= Functions.ToInt32(Config.Get("SplitterDocUploadValidationSize"))) { args.IsValid = false; ErrorMsg.Text = Functions.ToString(Config.Get("SplitterDocUploadValidationMessage")); return; } if (string.IsNullOrEmpty(fileName)) { fileName = System.IO.Path.GetFileName(fileUpload.PostedFile.FileName); } else { fileName = fileName + pFileExt; } } else { pGotFile = false; if (pRequired) { args.IsValid = false; ErrorMsg.Text = "Please select the document to upload"; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)