<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function()
{
$('#<%=fileupload1.ClientID
%>').change(function() {
var fileExtension = ['jpeg',
'jpg', 'png',
'gif', 'bmp'];
if ($.inArray($(this).val().split('.').pop().toLowerCase(), fileExtension) == -1)
{
alert("Only
'.jpeg','.jpg', '.png', '.gif', '.bmp' formats are allowed.");
}
})
})
</script>