Checking for file extension

Hey guys,
I have a class that allows certain types of files to be uploaded. Currently, it checks the files ContentType, however for example I want to allow .csv files to be uploaded and it's ContentType is: application/octet-stream but so is .ini and .dbo files (which I don't want) they all the same ContentType.
I would like to check for file extension as well. But FileUpload.PostedFile doesn't have that property.
Any suggestions?
Thanks!
[466 byte] By [Tryston02] at [2007-12-16]
# 2
Thanks but I can't view the solution because you have to pay a membership fee. Any others?
Tryston02 at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
I got it!!
Here's what I used:
string fileExtension = Path.GetExtension(_fileUpload.FileName);
if (fileExtension == ".csv")
{
blah
}
Tryston02 at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...
# 4

Good. As far as needing a subscription....you just need to scroll down the page a little more...

JasonD.Camp at 2007-9-9 > top of Msdn Tech,Visual C#,Visual C# General...