- string fileExtension = System.IO.Path.GetExtension(@"C:\MyFolder\MyFile.jpg")
- System.IO.FileInfo f = new System.IO.FileInfo(Server.MapPath("~/MyFolder/MyFile.jpg"));string extension = f.Extension;
Over here i prefer the second method.
Stay tune...
Have a nice day... 'N happy Coding :)
No comments:
Post a Comment