Try something like this:
string filename = "C:\\" + FileUpload1.FileName.ToString();
if (filename.EndsWith(".doc") || filename.EndsWith(".pdf"))
{
FileUpload1.SaveAs(filename);
}
else
{
}
It is simple, but should work for what you need. Of course you will chose the appropriate path for your saved file