Hi Joe,
You can refer to the following method:
protected void UploadAttachments1_FileValidating(object sender, UploaderEventArgs args)
{
string disabledExtList = "aspx,asp,ashx,html,htm,mht,exe,dll,php,jsp";
//validate the extensions
string ext=Path.GetExtension(args.FileName).TrimStart('.').ToLower();
ext = "," + ext + ",";
string list="," + disabledExtList.ToLower() + ",";
if (list.IndexOf(ext) != -1)
{
throw (new Exception("Invalid file type!"));
}
}
Thanks for asking