<%@ Page Title="Paste Upload" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxUploader" Namespace="AjaxUploader.Controls" TagPrefix="au" %> 
<asp:Content ID="TitleContent" ContentPlaceHolderID="TitleContent" runat="server">Paste Upload - AjaxUploader v5.2 Demos</asp:Content>
<asp:Content ID="HeaderContent" ContentPlaceHolderID="HeaderTitle" runat="server">Paste Upload</asp:Content> 
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> 
<div class="demo-card"> <div class="demo-card-header">Paste Upload</div> <div class="demo-card-body"> <p class="demo-description"> Enable clipboard paste upload with <code>EnablePaste="true"</code>. Users can
 paste images from the clipboard (Ctrl+V / Cmd+V) directly into the upload area.
 Ideal for screenshots, copied images, and quick image sharing workflows.
 </p> <div class="demo-expect"><strong>What you should see:</strong> copy an image and paste it onto the page (Ctrl+V) - it joins the queue like a picked file. Browse works too; images only.</div> <au:AjaxFileUpload ID="Uploader1" runat="server"
 EnablePaste="true"
 AutoUpload="true"
 ShowProgress="true"
 AllowedExtensions="jpg,jpeg,png,gif,webp,bmp"
 ButtonText="Browse or Paste (Ctrl+V)" /> <div class="alert alert-info mt-3" style="max-width: 500px;"> <strong>Try it:</strong> Copy an image to your clipboard (e.g., take a screenshot
 with Print Screen), then click in this area and press <kbd>Ctrl</kbd>+<kbd>V</kbd> to paste and upload it.
 </div> <div class="code-panel"> <pre><code>&lt;%-- Server control with paste enabled --%&gt;
&lt;au:AjaxFileUpload ID="Uploader1" runat="server"
 EnablePaste="true"
 AutoUpload="true"
 ShowProgress="true"
 AllowedExtensions="jpg,jpeg,png,gif,webp,bmp"
 ButtonText="Browse or Paste (Ctrl+V)" /&gt;

&lt;%-- JavaScript API equivalent --%&gt;
AjaxUploader.create(el, {
 uploadUrl: '<%= ResolveUrl("~/ajaxupload.axd/upload") %>',
 paste: true,
 autoUpload: true,
 allowedExtensions: ['jpg','jpeg','png','gif','webp','bmp'],
 onComplete: function (file) {
 statusEl.textContent = 'Pasted/uploaded: ' + file.name;
 }
});</code></pre> </div> </div>
</div> 
</asp:Content>
