Avatar of Evert Jor
Evert Jor
Flag 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.
ASPVB Script

Avatar of undefined
Last Comment
Big Monty

8/22/2022 - Mon
SOLUTION
Chinmay Patel

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Big Monty

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Shaun Vermaak

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

Big Monty

best solutions
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy