private bool IsValidLink(string lookupText)
{
bool result = false;
string[] validFileTypes = { ".html", ".htm", ".doc", ".docx", ".xls", ".xlsx", ".txt", ".pdf" };
foreach (string type in validFileTypes)
{
if (lookupText.EndsWith(type))
{
result = true;
break;
}
}
return result;
}