Do you want to display an error message next to the file or keep it from being added entirely?
If you want to display an error message, you can use the OnClientFileAdded attribute to set a javascript method to call when the file is added. Something like this:
OnClientFileAdded="onFileAdded"
function onFileAdded(file)
{
// validate the file and show a message
}
If you want to keep the file from being added in the first place, you can use the OnClientFileAdded attribute to set a javascript method to call when the file is added. Then return true or false depending on whether you want the file to be added. Something like this:
OnClientFileAdded="onFileAdded"
function onFileAdded(file)
{
// validate the file and show a message
var fileIsValid = true;
if (fileIsValid)
return true;
else
return false
}