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="" />

"First of all... loved the controls... its wonderful features and ease of use. Most of all, I would like to commend your support group. Even if we're still in evaluation mode, the support team has been great and very response. Keep up the great work!"

James Gagni Jr.
Aon Singapore

Random testimonial   All testimonials