Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

ASP.NET file contentlength

I'm passing in a variable to a sub as a string.

Private Sub UpdateDb(ByVal filename As String)

I need to get the file length. (size)

When I was passing it in as a collection I could get the file lengthwith

Dim _size = filename.contentlength

I still need the file size...some help?
ASKER CERTIFIED SOLUTION
Avatar of David H.H.Lee
David H.H.Lee
Flag of Malaysia 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
Is it possible to pass the file length as the parameter too!!
Avatar of Larry Brister

ASKER

x_com:
  That gives me the character length.  I need the file size
to get the file size in kb do this..

filename.length/1024
srivatsavaye:
filename.length gives me the characterlength of the filename.
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
That's it guys.  Thanks and splitting points