You can listen to the event changeon the client side. Here is the syntax for IE, but you can adapt it for better browsers.
<asp:FileUpload ID="FileUpload1" runat="server" /> <span id="txt" />
<script>
var fu = document.getElementById('<% =FileUpload1.ClientID %>');
fu.attachEvent('onchange', function (e) {
document.getElementById('txt').innerHTML = e.srcElement.value;
});
</script>
I am sure that good browsers will only report the file name, where IE also reports the full path (wrong).
source
share