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

<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">Image Dimensions - AjaxUploader v5.0 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">Image Dimension Validation</asp:Content>

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

<div class="demo-card">
    <div class="demo-card-header">Image Dimension Validation</div>
    <div class="demo-card-body">
        <p class="demo-description">
            Validate image width and height before upload using <code>EnableImageDimensions="true"</code>.
            Set minimum and maximum pixel dimensions with <code>MinImageWidth</code>, <code>MinImageHeight</code>,
            <code>MaxImageWidth</code>, and <code>MaxImageHeight</code>.
        </p>

        <au:AjaxFileUpload ID="Uploader1" runat="server"
            AllowedExtensions=".jpg,.png,.gif,.webp"
            EnableImageDimensions="true"
            MinImageWidth="200"
            MinImageHeight="200"
            MaxImageWidth="4000"
            MaxImageHeight="4000"
            ButtonText="Select Image"
            AutoUpload="true"
            ShowProgress="true" />

        <div class="code-panel">
            <pre><code>&lt;au:AjaxFileUpload ID="Uploader1" runat="server"
    AllowedExtensions=".jpg,.png,.gif,.webp"
    EnableImageDimensions="true"
    MinImageWidth="200"
    MinImageHeight="200"
    MaxImageWidth="4000"
    MaxImageHeight="4000"
    ButtonText="Select Image"
    AutoUpload="true"
    ShowProgress="true" /&gt;</code></pre>
        </div>

        <p class="mt-3 text-muted">
            Images must be at least 200x200 and no larger than 4000x4000 pixels.
            Try uploading a small icon or a very large image to see the validation.
        </p>
    </div>
</div>

</asp:Content>
