<%@ Page Title="Server Control Basics" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxUploader" Namespace="AjaxUploader.Controls" TagPrefix="au" %>

<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">Server Control Basics - AjaxUploader v5.0 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">Server Control Basics</asp:Content>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

<div class="demo-card">
    <div class="demo-card-header">Server Control Basics</div>
    <div class="demo-card-body">
        <p class="demo-description">
            The <code>&lt;au:AjaxFileUpload&gt;</code> server control provides a declarative way to add file uploads.
            Use properties to configure behavior without writing JavaScript.
        </p>

        <au:AjaxFileUpload ID="Uploader1" runat="server"
            AllowMultiple="true"
            MaxFileSize="5MB"
            AllowedExtensions=".jpg,.png,.gif,.pdf"
            MaxFileCount="5"
            ButtonText="Choose Files"
            AutoUpload="true"
            ShowProgress="true" />

        <div class="code-panel">
            <pre><code>&lt;au:AjaxFileUpload ID="Uploader1" runat="server"
    AllowMultiple="true"
    MaxFileSize="5MB"
    AllowedExtensions=".jpg,.png,.gif,.pdf"
    MaxFileCount="5"
    ButtonText="Choose Files"
    AutoUpload="true"
    ShowProgress="true" /&gt;</code></pre>
        </div>

        <h5 class="mt-4">Common Properties</h5>
        <table class="table table-sm table-bordered mt-2">
            <thead><tr><th>Property</th><th>Description</th></tr></thead>
            <tbody>
                <tr><td><code>AllowMultiple</code></td><td>Allow selecting multiple files</td></tr>
                <tr><td><code>MaxFileSize</code></td><td>Maximum file size (e.g. "5MB")</td></tr>
                <tr><td><code>AllowedExtensions</code></td><td>Comma-separated allowed extensions</td></tr>
                <tr><td><code>MaxFileCount</code></td><td>Maximum number of files</td></tr>
                <tr><td><code>AutoUpload</code></td><td>Start uploading immediately on selection</td></tr>
                <tr><td><code>ShowProgress</code></td><td>Show upload progress bar</td></tr>
                <tr><td><code>EnableDropZone</code></td><td>Enable drag-and-drop file selection</td></tr>
                <tr><td><code>ShowThumbnails</code></td><td>Show image thumbnails in queue</td></tr>
                <tr><td><code>ButtonText</code></td><td>Custom text for the upload button</td></tr>
            </tbody>
        </table>
    </div>
</div>

</asp:Content>
