What should i use for an HttpPostedFileBase Read Type?

83 views Asked by At

I have a form where the user submits some details and a file of any kind, now since the file uploaded is of type HttpPostedFileBase, how can i arrange the reader from GetString in order to read the File Name of the uploaded file. Thanks

Error in Code

enter image description here

Properties

enter image description here

1

There are 1 answers

2
YuriyK On

Why not to check file extention by something like: f.Substring(f.LastIndexOf('.')+1, 3));