Hi,
i have small problem. upload a file how to get the file size.
code:
private static string getFileName(HttpContext web, string fieldName)
{
try{
//HttpPostedFile file = web.Request.Files[web.Request["attachedFile"]];
HttpPostedFile file = web.Request.Files[fieldName];
if(file!=null) {
return System.IO.Path.GetFileName(file.FileName);
}else{
return "";
}
}catch(Exception e){
return "";
}
}
how to get file size in this function. pls give me any solutions