Issue:
How to get File Extension from File Name - C#,ASP.NET
Solution:
System.IO.Path.GetExtension(filename);
Example:
string fileName = @"C:\temp\mypic.jpg";
extension = Path.GetExtension(fileName);
Console.WriteLine("Extension:"+extension);