ASP.NET 3.5 and above only

File Upload - Knowledge Base

« Back to Knowledge Base list

Hide the 'files list' flyout

Q:

I want to hide the "files list" flyout which is visible on hovering [ XX files selected ] text of the FileUpload control:



How can I prevent this flyout?

A:

You can do it in the client-side.
Here is the code sample:

<obout:FileUpload ID="fldPhoto" runat="server" Width="250px" BrowseFieldDescription="Images"
  ValidFileExtensions="jpeg;jpg;jpe;png;gif;bmp;tga;tiff" />
...
<script type="text/javascript">
  // after all components in the page are initialized
  function pageLoad(sender, args) {
     // get the inner 'fileList' component of the FileUpload
     var filesList = $find("<%= fldPhoto.ClientID %>")._filesList;
     // reset the the 'mouseover' and 'mouseout' events handlers to do nothing
     filesList._mouseOver$delegate = function (ev) { return true; };
     filesList._mouseOut$delegate = function (ev) { return true; };
  }
</script>

"Wonderful components! It is so easy to use your controls."

Maria S

Random testimonial   All testimonials