Link to home
Start Free TrialLog in
Avatar of Evert Jor
Evert JorFlag for Norway

asked on

Need to display file size on ASP-page

I need to display the file size of an image file on a page. I think it should be possible by a VB-script. I can get the file path from a database and use that in the script, but how do I get the file size? Any suggestions are appreciated. Thanks in advance.
SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is for ASP.NET (C#). For VBScript use the other suggestions
FileInfo fileInfo = new FileInfo(filePath);
long fileSize = fileInfo.Length;

Open in new window

best solutions