ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - File Upload - Inside obout Flyout

Click the button below to upload files.

<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.FileUpload" TagPrefix="obout" %>
<%@ Register Assembly="obout_Flyout2_NET" Namespace="OboutInc.Flyout2" TagPrefix="obout" %>
<script type="text/JavaScript">
function onClientBeforeUpload(sender, args) {
   $get("<%= label.ClientID %>;").innerHTML = ""
   return true;
function closeFlyout() {
   <%=Flyout1.getClientID() %>.Close();
   return false;
<asp:UpdatePanel runat="server" ID="UpdatePanel1"><ContentTemplate>
      <asp:Button runat="server" ID="show" Text="Open 'Upload files' popup" OnClientClick="return false;" />
      <br /><br />
      <asp:Label runat="server" ID="label" Text="" />
  <obout:Flyout runat="server" ID="Flyout1" AttachTo="show" OpenEvent="ONCLICK" CloseEvent="NONE" >
     <div style="border: solid 1px black; padding:3px; background-color: White;filter:alpha(opacity:100);">
        <obout:FileUpload OnClientBeforeUpload="onClientBeforeUpload" MaximumTotalFileSize="10240"
                     Width="250px" runat="server" id="fileUpload1" />
        <asp:Button runat="server" ID="submit" OnClick="submit_clicked" Text="Upload selected files" />
        <asp:Button runat="server" ID="cancel" Text="Close" OnClientClick="return closeFlyout();" />
protected void submit_clicked(object sender, EventArgs e)
  string result = "";
  foreach (PostedFileInfo info in fileUpload1.PostedFiles)
     if (result.Length == 0)
        result = "<b>Uploaded files:</b><br><br>" +
                   "<table align='center' border='0' cellspacing='2' cellpadding='2'>" +
                   "<tr><td style='font-weight: bold; text-align:left;'>File name</td>" +
                   "<td style='font-weight: bold; text-align:left;'>Length</td>" +
                   "<td style='font-weight: bold; text-align:left;'>Content type</td></tr>";
     result += "<tr><td style='text-align:left;'>" + info.FileName + "</td><td style='text-align:left;'>" +
                  info.ContentLength + "</td><td style='text-align:left;'>" + info.ContentType + "</td></tr>";
  if (result.Length == 0)
     result = "No files uploaded";
     result += "</table>";
  label.Text = result;

"Perfect! Honestly, you guys make me look brilliant. Your components offer a dynamic, and professionally designed experience for my users. The TreeView has been invaluable to me, huge datasets and enormous hierarchies are a snap. However, when you first introduced the CALLBACK, you rocked my world! Having moved from desktop to web applications, I missed the functionality I used to have. You gave it back - thank you. I can't tell you the number of times I've been asked "How'd you do that?" (even from our tech support and contractors)."

John Cappelletti

Random testimonial   All testimonials