ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - File Upload -Limited number of files

Here you can upload up to 10 MB of any files, but not more than two files.
Client-side filesPicked event is used.

<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.FileUpload" TagPrefix="obout" %>
<script type="text/JavaScript">
function onClientBeforeUpload(sender, args) {
   $get("<%= label.ClientID %>").innerHTML = ""
   return true;
function onClientFilesPicked(sender, args) {
  if (args.get_files().length > 2) {
      alert("Too many files selected: " + args.get_files().length);
<asp:UpdatePanel runat="server" ID="UpdatePanel1"><ContentTemplate>
<obout:FileUpload OnClientBeforeUpload="onClientBeforeUpload"
       MaximumTotalFileSize="10240" OnClientFilesPicked="onClientFilesPicked"
       Width="250px" runat="server" id="fileUpload1"
<br /><asp:Button runat="server" ID="submit" Text="Upload files" /><br /><br />
<asp:Label runat="server" ID="label" Text="" />

"I want to say your product is excellent – far more than we were expecting!"

Jorge Rojas Mata

Random testimonial   All testimonials