<%@ Page Title="Upload Complete" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" %>
<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">Upload Complete - AjaxUploader v5.3 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">Upload Complete</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<div class="demo-card">
  <div class="demo-card-header">Redirect Target</div>
  <div class="demo-card-body">
    <p class="demo-description">
      This lightweight page is the local redirect target used by the On Complete Redirect demo.
      It keeps the sample URL runnable inside the demo site and the downloadable package.
    </p>
    <div class="demo-expect"><strong>What you should see:</strong> the batch-level completion event fires once when every file has finished - the right hook for a redirect or a summary, as opposed to per-file completion.</div> <div class="alert alert-success" role="status" aria-live="polite">
      <strong>Upload workflow complete.</strong>
      <span id="fileCountText">The redirect target loaded successfully.</span>
    </div>
    <p class="mb-0">
      <a class="btn btn-primary" href="OnCompleteRedirect.aspx">Back to redirect demo</a>
    </p>
  </div>
</div>
</asp:Content>
<asp:Content ID="ScriptsContent" ContentPlaceHolderID="ScriptsContent" runat="server">
<script>
 (function () {
   var params = new URLSearchParams(window.location.search || '');
   var count = parseInt(params.get('files'), 10);
   if (!isFinite(count) || count < 0) {
     return;
   }
   var label = count === 1 ? 'file' : 'files';
   document.getElementById('fileCountText').textContent = count + ' ' + label + ' uploaded before redirect.';
 }());
</script>
</asp:Content>
