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