Surya sasidhar Surya sasidhar - 5 months ago 38
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"