<%@ Page Title="Configuration" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxUploader" Namespace="AjaxUploader.Controls" TagPrefix="au" %> 
<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">Configuration - AjaxUploader v5.2 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">Configuration</asp:Content> 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> 
<div class="demo-card"> <div class="demo-card-header">Web.config Configuration</div> <div class="demo-card-body"> <p class="demo-description"> Configure AjaxUploader in your web.config with appSettings. Set default upload paths,
 size limits, allowed extensions, and other server-side options.
 </p> <div class="demo-expect"><strong>What you should see:</strong> server-side defaults applied from Web.config appSettings: <code>.jpg/.png/.gif/.pdf/.docx/.xlsx</code> only. Configuration lives in one place instead of on every page.</div> <div class="code-panel"> <pre><code>&lt;!-- web.config --&gt;
&lt;configuration&gt;
 &lt;appSettings&gt;
 &lt;add key="AjaxUploader:UploadPath" value="~/uploads" /&gt;
 &lt;add key="AjaxUploader:MaxFileSize" value="52428800" /&gt; &lt;!-- 50 MB --&gt;
 &lt;add key="AjaxUploader:AllowedExtensions" value=".jpg,.png,.gif,.pdf,.docx,.xlsx" /&gt;
 &lt;add key="AjaxUploader:ChunkSize" value="2097152" /&gt; &lt;!-- 2 MB --&gt;
 &lt;/appSettings&gt;
&lt;/configuration&gt;</code></pre> </div> <h5 class="mt-4">Try It</h5> <p>This uploader uses the server-configured defaults:</p> <au:AjaxFileUpload ID="Uploader1" runat="server"
 ButtonText="Upload with Server Defaults"
 Extensions=".jpg,.png,.gif,.pdf,.docx,.xlsx"
 ShowProgress="true" /> <h5 class="mt-4">Available Options</h5> <table class="table table-sm table-bordered mt-2"> <caption class="visually-hidden">AjaxUploader app setting options</caption> <thead><tr><th scope="col">AppSetting Key</th><th scope="col">Description</th><th scope="col">Default</th></tr></thead> <tbody> <tr><td><code>AjaxUploader:UploadPath</code></td><td>Directory where files are saved</td><td>~/uploads</td></tr> <tr><td><code>AjaxUploader:MaxFileSize</code></td><td>Max file size in bytes</td><td>10 MB</td></tr> <tr><td><code>AjaxUploader:AllowedExtensions</code></td><td>Comma-separated allowed file extensions</td><td>All</td></tr> <tr><td><code>AjaxUploader:ChunkSize</code></td><td>Chunk size for chunked uploads</td><td>2 MB</td></tr> </tbody> </table> </div>
</div> 
</asp:Content>
