I suppose that will work, however with the file uploads in asp.net, there's an even better way to test file type/extension....

lets say your file input is called myFile:

<input type="file" Runat="server" id="myFile">

Use:
VB Code:
  1. myFile.PostedFile.ContentType

i'm not sure what it will return for a PDF, so make a test page that has a file input and upload a pdf file then just response.write(myFile.PostedFile.ContentType)... that should return a string of the content type... this should look at the file itself, and it will make sure that the file is the proper type, not just the extension...