Posted by Pokuri31 under ASP.NET on 12/17/2008 | Views : 1782 | Status : [Member] | Replies : 1
hi Friends,

FileInfo imageInfo = new FileInfo(File1.Value.Trim());

after writing this no errors , but press a button it will thrown an exception "The path is not of a legal form."
how to over come this problem.

Thanking You,



Posted by: Poster on: 12/18/2008 [Member] Starter

I guess File1 is the FileUpload control. You won't be able to get the file info for the file that is in the client machine. You need to upload to the server first then get it using Server.MapPath and then you will be able to get any file information.

Of course, you can get the extension name of the file by getting the value of the FileUpload control.


Pokuri31, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response