Surya sasidhar Surya sasidhar - 8 months ago 49
ASP.NET (C#) Question

How to find extension of a file?

in my web application (,c#) i am uploading video file in a page but i want to upload only flv videos. how can i restrict when i upload other extension videos help me please.



string myFilePath = @"C:\MyFile.txt";
string ext = Path.GetExtension(myFilePath);
// ext would be ".txt"